Chris Lattner
cd691d2047
Give a better error message in an unhandled case
...
llvm-svn: 4521
2002-11-04 02:29:15 +00:00
Chris Lattner
ee792946bb
Minor fix to space accounting
...
llvm-svn: 4520
2002-11-04 01:49:45 +00:00
Chris Lattner
559f5118d1
Implement MaxRSS in terms of mallinfo instead of the system RSS. This gives
...
us much more accurate numbers and actually WORKS.
llvm-svn: 4518
2002-11-04 00:32:44 +00:00
Chris Lattner
b9d55473b5
Allow the call graph to be called from analyze naturally with print implemented
...
llvm-svn: 4517
2002-11-04 00:21:19 +00:00
Chris Lattner
a20fabc7ec
Rename ValueMap to ScalarMap
...
llvm-svn: 4516
2002-11-03 21:27:48 +00:00
Chris Lattner
bd7af8e664
Rename NewNode flag to HeapNode
...
llvm-svn: 4515
2002-11-03 21:24:04 +00:00
Chris Lattner
4b6a813048
Change the letters used to represent stack and heap allocations to "S" and "H"
...
respectively. This is to make presentation easier in the paper.
llvm-svn: 4514
2002-11-03 19:46:15 +00:00
Anand Shukla
320febba68
code to lightly instrument at branches
...
llvm-svn: 4511
2002-11-03 01:45:20 +00:00
Chris Lattner
36051c0c56
Move function to cpp file from header
...
llvm-svn: 4510
2002-11-02 22:07:51 +00:00
Chris Lattner
781986c436
Implement signed and unsigned division and remainder
...
llvm-svn: 4508
2002-11-02 20:54:46 +00:00
Chris Lattner
d12e1bc777
Implement multiply operator
...
llvm-svn: 4506
2002-11-02 20:28:58 +00:00
Chris Lattner
e823fb32f4
* Implement subtract
...
* Merge add code into logical code
llvm-svn: 4503
2002-11-02 20:13:22 +00:00
Chris Lattner
dd873d2179
shuffle code around a bit, implement and, or, xor
...
llvm-svn: 4502
2002-11-02 20:04:26 +00:00
Chris Lattner
abe3280ad9
Add PHI node support, add comment for branch function
...
llvm-svn: 4500
2002-11-02 19:45:49 +00:00
Chris Lattner
16af2d5aa8
Implement unconditional branching support
...
llvm-svn: 4498
2002-11-02 19:27:56 +00:00
Chris Lattner
cfb187f6bb
* Fix nonconstant shift case
...
* Turn table into 2d table
llvm-svn: 4496
2002-11-02 01:41:55 +00:00
Chris Lattner
ff3d28f403
Use a more table driven approach to handling types. Seems to simplify the
...
code a bit
llvm-svn: 4493
2002-11-02 01:15:18 +00:00
Chris Lattner
63f4e752cd
Make switch statements denser, but only because of the follow-on patch
...
llvm-svn: 4492
2002-11-02 00:49:56 +00:00
Chris Lattner
122b73b7a6
* Remove dead variable
...
* Shift amount is always guaranteed to be 8 bits
llvm-svn: 4491
2002-11-02 00:44:25 +00:00
Chris Lattner
63ba1aca7c
Implement the "unknown flag" which mainly consists of aligning printing code
...
llvm-svn: 4490
2002-11-02 00:36:03 +00:00
Chris Lattner
364e6e82fd
Oops, this was not meant to be checked in
...
llvm-svn: 4489
2002-11-02 00:26:32 +00:00
Chris Lattner
a7b0d4eb08
Stop representing scalars as explicit nodes in the graph. Now the only
...
nodes in the graph are memory objects, which is very nice. This also greatly
reduces the size and memory footprint for DSGraphs. For example, the local
DSGraph for llu went from 65 to 13 nodes with this change. As a side bonus,
dot seems to lay out the graphs slightly better too. :)
llvm-svn: 4488
2002-11-02 00:13:20 +00:00
Nick Hildenbrandt
5c5e78482e
Fixed bug in Regression/CBackend/2002-10-30-FunctionPointerAlloca.ll
...
llvm-svn: 4486
2002-11-01 17:37:09 +00:00
Chris Lattner
8a1854fc47
Fix comments, steens is context sensitive, we just haven't implemented
...
mod/ref apis yet
llvm-svn: 4485
2002-11-01 17:34:23 +00:00
Chris Lattner
dcf31cec85
New iostream definitions
...
llvm-svn: 4482
2002-11-01 16:46:05 +00:00
Chris Lattner
36c05c8f69
Make sure to include name information if we have it
...
llvm-svn: 4481
2002-11-01 04:49:06 +00:00
Chris Lattner
8c68d869e5
Add a fixme
...
llvm-svn: 4479
2002-10-31 23:24:00 +00:00
Brian Gaeke
6e2d676829
InstSelectSimple.cpp: Include llvm/iOther.h for ShiftInst.
...
Add ISel::visitShiftInst() to instruction select shift instructions.
Add a comment in visitAdd about how to do 64 bit adds.
X86InstrInfo.def: Add register-to-register move opcodes and shift opcodes.
llvm-svn: 4477
2002-10-31 23:03:59 +00:00
Chris Lattner
c1d8820711
* Minor optimization: when merging nodes, merge the smaller one into the
...
larger one.
* Handle the case where we are merging two nodes of different size better.
llvm-svn: 4476
2002-10-31 22:41:15 +00:00
Chris Lattner
8cdd50d177
Reassociate pass now works
...
llvm-svn: 4473
2002-10-31 17:16:18 +00:00
Chris Lattner
8fdf75cde5
Fixes to the reassociate pass to make it respect dominance properties
...
Huge thanks go to Casey Carter for writing this fix, reassociate is now
reoperational!
llvm-svn: 4471
2002-10-31 17:12:59 +00:00
Chris Lattner
4d2997f25d
Fix nasty bug in ::isNeg()
...
llvm-svn: 4470
2002-10-31 17:09:06 +00:00
Vikram S. Adve
8c7b93f7e3
Restore support for indirect function calls (which briefly wasn't working
...
after I removed annotations on MachineInstr for the CallDescriptor).
llvm-svn: 4469
2002-10-31 15:34:48 +00:00
Chris Lattner
5d428a0029
Remove dead code
...
llvm-svn: 4467
2002-10-31 06:52:26 +00:00
Chris Lattner
7d5f19886d
This fixes all kinds of problems with array handling. There are still bugs to
...
be fixed, but we are getting much closer now.
* Make DSNode::TypeRec a full fledged DSTypeRec type.
* Add methods used to update and access the typerecords elements
* Add methods to query if and to cause a node to be completely folded
* DSGraph construction doesn't use the allocation type for anything at all,
now nodes get their type information based on how they are used.
* Fixed a bug with global value handling introduced in the last checkin
* GEP support is now much better, arrays are handled correctly. The array
flag is now updated in type records. There are still cases that are not
handled yet (we do not detect pessimizations), but getting much closer.
llvm-svn: 4465
2002-10-31 05:45:02 +00:00
Chris Lattner
f6cfaedcff
Can simplify code now with the isCommutative() method.
...
llvm-svn: 4461
2002-10-31 04:24:23 +00:00
Chris Lattner
d1998c4aea
Use new isCommutative interface, which gives us SetEQ and SetNE for free.
...
Thanks fly out to Casey Carter for this fix.
llvm-svn: 4460
2002-10-31 04:20:07 +00:00
Chris Lattner
cab6c33811
New isAssociative/isCommutative inspection methods, graciously contributed by
...
Casey Carter.
llvm-svn: 4459
2002-10-31 04:14:01 +00:00
Chris Lattner
12764c85e8
BreakCriticalEdges should update dominance frontier information as well as
...
other dominance stuff. Patch contributed by Casey Carter
llvm-svn: 4457
2002-10-31 02:44:36 +00:00
Chris Lattner
61596ad266
Fix two problems:
...
* Load Implementation can cause unaligned memory accesses, which caused
problems for sparc.
* cast from pointer to pointer would zero the upper 32 bits of the pointer
which obviously causes problems on 64 bit hosts.
llvm-svn: 4454
2002-10-30 21:47:57 +00:00
Vikram S. Adve
9f205ddfdd
In getID(), don't call getValidSymbolName to mangle external names!
...
llvm-svn: 4451
2002-10-30 20:16:38 +00:00
Chris Lattner
6c34c0baf5
Add lots more info
...
llvm-svn: 4450
2002-10-30 06:04:46 +00:00
Chris Lattner
6c614a9931
Remove fixme
...
llvm-svn: 4447
2002-10-30 02:02:37 +00:00
Chris Lattner
ac6e97410b
Add special code to make printing SSA form machine instructions nicer
...
llvm-svn: 4446
2002-10-30 01:55:38 +00:00
Chris Lattner
c9e1efd0f8
Make sure to set the destination register correctly
...
llvm-svn: 4444
2002-10-30 01:49:01 +00:00
Chris Lattner
87b84a6913
Set the destination register field based on the target specific flags
...
llvm-svn: 4442
2002-10-30 01:15:31 +00:00
Chris Lattner
60c59d5b4e
Add flag to specify when no value is produced by an instruction
...
llvm-svn: 4441
2002-10-30 01:09:34 +00:00
Chris Lattner
c1d7563566
Sparc backend doesn't use target specific flags yet
...
llvm-svn: 4440
2002-10-30 01:07:12 +00:00
Chris Lattner
4e9fb1f52e
Use MRegisterInfo, if available, to print symbolic register names
...
llvm-svn: 4438
2002-10-30 00:58:19 +00:00
Chris Lattner
858a4a6595
Implement the new optional getRegisterInfo
...
llvm-svn: 4437
2002-10-30 00:56:18 +00:00
Chris Lattner
214808f8ac
Implement structured machine code printing
...
llvm-svn: 4435
2002-10-30 00:48:05 +00:00
Chris Lattner
d7a855668d
Print machine code after instruction selection
...
llvm-svn: 4434
2002-10-30 00:47:49 +00:00
Chris Lattner
e3ceb17d54
Make sure to pass the LLVM basic block in
...
llvm-svn: 4433
2002-10-30 00:47:40 +00:00
Chris Lattner
7ee171b717
Construct annotation, to make sure it's attached to function
...
llvm-svn: 4429
2002-10-29 23:40:58 +00:00
Chris Lattner
90e64905b9
Make argsize calculation stuff optional, so that Targets without FrameInfo
...
objects yet don't die
llvm-svn: 4427
2002-10-29 23:40:03 +00:00
Chris Lattner
27ccb70df6
Implement autoinserting ctor
...
llvm-svn: 4426
2002-10-29 23:19:00 +00:00
Chris Lattner
bbd68ada1a
Rename annotation id
...
llvm-svn: 4425
2002-10-29 23:18:43 +00:00
Misha Brukman
632df28deb
Fix spelling of `propagate'.
...
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner
02a3d837c2
Convert backend to use passes, implement X86TargetMachine
...
llvm-svn: 4421
2002-10-29 22:37:54 +00:00
Chris Lattner
e2ac271173
These are no longer virtual methods
...
llvm-svn: 4420
2002-10-29 22:01:44 +00:00
Chris Lattner
b848956370
* Privatize the TargetName
...
* Move optSizeForSubWordData to TargetData
* Remove unused fields
llvm-svn: 4417
2002-10-29 21:48:17 +00:00
Chris Lattner
abd7fdcb99
Implement findOptimalStorageSize a bit more generally
...
llvm-svn: 4416
2002-10-29 21:47:50 +00:00
Chris Lattner
5667f0eefd
Allow TargetMachine to refuse static code gen
...
llvm-svn: 4415
2002-10-29 21:12:46 +00:00
Chris Lattner
27d247978b
Rename X86InstructionInfo to X86InstrInfo
...
llvm-svn: 4413
2002-10-29 21:05:24 +00:00
Chris Lattner
f57420ee17
Minor renaming
...
llvm-svn: 4410
2002-10-29 20:48:56 +00:00
Chris Lattner
69127c68ed
Remove unneccesary #includes
...
llvm-svn: 4408
2002-10-29 20:47:46 +00:00
Chris Lattner
71b6d491db
Rename Sparc.h to TargetMachineImpls.h
...
llvm-svn: 4407
2002-10-29 20:47:26 +00:00
Chris Lattner
ec1dcd0849
Reenable X86 backend, even though it doesn't do much, at least it compiles
...
llvm-svn: 4404
2002-10-29 20:29:34 +00:00
Chris Lattner
f4e4ed7612
Merge with sparc backend
...
llvm-svn: 4403
2002-10-29 20:10:58 +00:00
Chris Lattner
8d3e9ab2cf
X86 merge is complete, eliminate unused code
...
llvm-svn: 4400
2002-10-29 20:07:16 +00:00
Vikram S. Adve
a1b4f0f85e
Remove separate vector of implicit refs from MachineInstr, and
...
instead record them as extra operands in the operands[] vector.
Also, move CallArgsDescriptor into this class instead of making it an
annotation on the machine instruction.
llvm-svn: 4399
2002-10-29 19:41:18 +00:00
Vikram S. Adve
db6596e551
Move CallArgsDescriptor into this class instead of making it an
...
annotation on the machine instruction.
llvm-svn: 4398
2002-10-29 19:38:46 +00:00
Vikram S. Adve
ea0d174f1a
Bug fix: align size for dynamic allocas according to stack pointer
...
alignment restrictions. This is incomplete for one case.
llvm-svn: 4397
2002-10-29 19:37:31 +00:00
Chris Lattner
2990e9b6cd
Switch to generating machineinstr's instead of MInstructions
...
llvm-svn: 4396
2002-10-29 17:43:55 +00:00
Chris Lattner
6c3f9c1b8f
Be compatible with sparc backend
...
llvm-svn: 4395
2002-10-29 17:43:38 +00:00
Chris Lattner
16cbd41c21
Implement MachineInstrInfo interface
...
llvm-svn: 4394
2002-10-29 17:43:19 +00:00
Chris Lattner
f4b122dbc5
Switch to different flag set
...
llvm-svn: 4393
2002-10-29 17:42:40 +00:00
Chris Lattner
07e26837a9
Move TargetInstrDescriptors extern to the one .cpp file that refers to it:
...
MachineInstr.cpp
llvm-svn: 4392
2002-10-29 17:40:30 +00:00
Chris Lattner
268d600a88
Move TargetInstrDescriptors to MachineInstrInfo.cpp
...
llvm-svn: 4391
2002-10-29 17:37:48 +00:00
Chris Lattner
52ce69b8e2
*** empty log message ***
...
llvm-svn: 4390
2002-10-29 17:35:41 +00:00
Chris Lattner
660bf10981
Use higher level methods, don't use TargetInstrDescriptors directly!
...
llvm-svn: 4389
2002-10-29 17:35:39 +00:00
Chris Lattner
50ef1010c0
Use higher level method
...
llvm-svn: 4386
2002-10-29 17:25:41 +00:00
Chris Lattner
76014b97af
Remove #include, misleading comment, and a typedef used only once
...
llvm-svn: 4383
2002-10-29 17:08:05 +00:00
Chris Lattner
6d6d87f3f3
Inline typedef, eliminate unused method
...
llvm-svn: 4382
2002-10-29 17:03:19 +00:00
Chris Lattner
ca0f818347
Remove long dead #if 0
...
llvm-svn: 4381
2002-10-29 17:00:19 +00:00
Chris Lattner
5abe44bb72
Add #includes that were eliminated from headers
...
llvm-svn: 4380
2002-10-29 16:51:05 +00:00
Chris Lattner
189c099a7f
De-inline methods
...
llvm-svn: 4379
2002-10-29 16:50:33 +00:00
Chris Lattner
c9e9d2933d
Remove #include
...
llvm-svn: 4378
2002-10-29 16:50:20 +00:00
Chris Lattner
e9bda57b87
Remove unneeded #include
...
llvm-svn: 4377
2002-10-29 16:50:06 +00:00
Chris Lattner
a13000449e
Remove forward decl
...
llvm-svn: 4376
2002-10-29 16:49:44 +00:00
Chris Lattner
7ecc7af4bd
Make assertIGNode be private to the InterferenceGraph.cpp file
...
llvm-svn: 4375
2002-10-29 16:42:34 +00:00
Chris Lattner
01efae0bbf
MachineInstrInfo doesn't need a TargetMachine
...
llvm-svn: 4372
2002-10-29 15:45:20 +00:00
Chris Lattner
5cbb8183d6
Don't build X86 target until it builds properly again
...
llvm-svn: 4369
2002-10-28 23:56:41 +00:00
Chris Lattner
910b82f042
Seperate code out of TargetMachine into MachineInstrInfo
...
llvm-svn: 4368
2002-10-28 23:55:33 +00:00
Chris Lattner
1303f2f057
Initial stab at MachineInstr'ication
...
llvm-svn: 4367
2002-10-28 23:55:19 +00:00
Chris Lattner
820b037815
MachineInstrInfo no longer #includes this header, so we must
...
llvm-svn: 4366
2002-10-28 23:54:47 +00:00
Chris Lattner
cbe6385890
Use BuildMI instead of explicit code.
...
llvm-svn: 4362
2002-10-28 21:43:57 +00:00
Chris Lattner
5c7d638208
Remove all traces of the "Opcode Mask" field in the MachineInstr class
...
llvm-svn: 4359
2002-10-28 21:17:20 +00:00
Chris Lattner
bee314fc94
Remove more default arguments that are never used
...
llvm-svn: 4358
2002-10-28 21:02:40 +00:00
Chris Lattner
307fb1a314
Remove default operands that are never used
...
llvm-svn: 4357
2002-10-28 20:59:49 +00:00
Chris Lattner
ca4a9d20b8
* Make MachineOperand ctors private, so MachineOperand can only be created
...
by MachineInstr.
* Add a bunch of new methods to allow incremental addition of operands to the
machine instr instance.
llvm-svn: 4356
2002-10-28 20:48:39 +00:00
Chris Lattner
3d736950ea
Fix minor bug
...
llvm-svn: 4355
2002-10-28 20:11:17 +00:00
Chris Lattner
9bebf832c8
Don't pass default args
...
llvm-svn: 4354
2002-10-28 20:10:56 +00:00
Misha Brukman
d5b45791a4
Fixed spelling and grammar.
...
llvm-svn: 4353
2002-10-28 20:01:52 +00:00
Misha Brukman
181ea4a265
Rewrote uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
...
llvm-svn: 4352
2002-10-28 20:01:13 +00:00
Misha Brukman
6be5e92526
Replaced uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
...
llvm-svn: 4351
2002-10-28 20:00:31 +00:00
Nick Hildenbrandt
85e3d59a1c
Casting NULL can cause problems so lets just not cast NULL to anything.
...
llvm-svn: 4349
2002-10-28 19:54:06 +00:00
Chris Lattner
864d279667
Remove two arguments that are never specified
...
llvm-svn: 4348
2002-10-28 19:46:59 +00:00
Chris Lattner
780090bbf1
Don't bother passing in default value
...
llvm-svn: 4347
2002-10-28 19:46:25 +00:00
Chris Lattner
b1e39b5a27
Rename some regalloc fields
...
llvm-svn: 4346
2002-10-28 19:43:23 +00:00
Chris Lattner
e3aa50d6b7
Fixes to work with updated RegAlloc
...
llvm-svn: 4345
2002-10-28 19:32:07 +00:00
Chris Lattner
c9bd2c38a8
Eliminate usage of MachineBasicBlock::get
...
llvm-svn: 4344
2002-10-28 19:22:04 +00:00
Nick Hildenbrandt
c7147032f3
*** empty log message ***
...
llvm-svn: 4343
2002-10-28 19:05:12 +00:00
Chris Lattner
76d59276af
Remove usage of MachineBasicBlock::get
...
llvm-svn: 4342
2002-10-28 19:01:16 +00:00
Chris Lattner
967c38f4c5
Remove usage of MachineBasicBlock::get
...
llvm-svn: 4341
2002-10-28 18:50:08 +00:00
Chris Lattner
a7ee81d6a5
Eliminate uses of MachineBasicBlock::get
...
llvm-svn: 4340
2002-10-28 18:01:21 +00:00
Chris Lattner
7421df92cb
Eliminate unneccesary use of MachineBasicBlock::get
...
llvm-svn: 4339
2002-10-28 06:01:57 +00:00
Chris Lattner
ba3a8060ff
s/method/function
...
llvm-svn: 4338
2002-10-28 05:58:46 +00:00
Chris Lattner
8c63b6897d
Change MachineBasicBlock's to not be Annotations, instead they are kept as
...
part of a linked list tracked by MachineFunction. MachineBasicBlock::get
is now linear time instead of constant time, and thus is deprecated!
llvm-svn: 4337
2002-10-28 05:30:46 +00:00
Chris Lattner
e1a3de779e
Make sched class unsigned
...
llvm-svn: 4336
2002-10-28 04:59:43 +00:00
Chris Lattner
881d8b3410
Make Scheduling Class variables be 'unsigned' instead of 'int'
...
llvm-svn: 4333
2002-10-28 04:53:02 +00:00
Chris Lattner
6a30b02b1d
Rename the redundant MachineOperand::getOperandType() to MachineOperand::getType()
...
llvm-svn: 4331
2002-10-28 04:45:29 +00:00
Chris Lattner
340bb96e64
Fairly major overhaul of MachineInstr & Operand classes
...
- Inline methods that are mostly a single line anyway
- Eliminate several methods that were never called
- Group methods a bit more consistently
llvm-svn: 4329
2002-10-28 04:24:49 +00:00
Chris Lattner
9668c8c8db
Add #includes now that MachineInstr.h doesn't include llvm/Target/MachineInstrInfo.h
...
llvm-svn: 4327
2002-10-28 02:28:39 +00:00
Chris Lattner
94a4f22573
Don't #include <Support/*>, #include "Support/*"
...
llvm-svn: 4325
2002-10-28 02:11:53 +00:00
Chris Lattner
2a3bd1c562
*** empty log message ***
...
llvm-svn: 4323
2002-10-28 02:01:37 +00:00
Chris Lattner
658839bafd
MachineFunction now includes MachineBasicBlock so there is no need to
...
reinclude it
llvm-svn: 4322
2002-10-28 02:01:35 +00:00
Chris Lattner
8710aab04c
Rename MachineCodeForBasicBlock to MachineBasicBlock
...
llvm-svn: 4318
2002-10-28 01:41:47 +00:00
Chris Lattner
6fc3ca062d
*** empty log message ***
...
llvm-svn: 4317
2002-10-28 01:41:27 +00:00
Chris Lattner
9baa9ad7c7
Inline some methods from .cpp files into .h files, minor cleanups
...
llvm-svn: 4313
2002-10-28 01:21:55 +00:00
Chris Lattner
8494d08688
Minor cleanups
...
llvm-svn: 4312
2002-10-28 01:16:38 +00:00
Chris Lattner
6d8a6c645c
Move machine code generation/destruction passes out of Sparc.cpp because
...
they are generic
llvm-svn: 4310
2002-10-28 01:12:41 +00:00
Chris Lattner
e94db67c4f
Move addPassesToEmitAssembly from TargetMachine to UltraSparc because it
...
really is sparc specific.
llvm-svn: 4308
2002-10-28 01:03:43 +00:00
Chris Lattner
f9df48d34c
Prune #includes
...
llvm-svn: 4307
2002-10-28 01:02:51 +00:00
Chris Lattner
9f99867c6c
Updates to match misha's changes
...
llvm-svn: 4302
2002-10-28 00:37:53 +00:00
Misha Brukman
7ae7f84cf3
Changed `MachineCodeForMethod' to `MachineFunction'.
...
llvm-svn: 4301
2002-10-28 00:28:31 +00:00
Chris Lattner
52c2d10a19
Remove dead fixme
...
llvm-svn: 4300
2002-10-27 21:23:43 +00:00
Chris Lattner
7d3e5dbf2b
Instruction select constant arguments correctly
...
llvm-svn: 4297
2002-10-27 21:16:59 +00:00
Chris Lattner
407582dc5a
Add instruction definitions for mov r, imm instructions
...
llvm-svn: 4296
2002-10-27 21:16:44 +00:00
Chris Lattner
fb34004733
change ++ to +1 when using random access iterators
...
llvm-svn: 4292
2002-10-27 19:09:51 +00:00
Chris Lattner
c98c871617
Add #include
...
llvm-svn: 4291
2002-10-27 19:08:03 +00:00
Chris Lattner
7fe1f7c931
Fix a major bug in lli
...
llvm-svn: 4289
2002-10-26 01:57:15 +00:00
Chris Lattner
d92fb0058b
Initial checkin of X86 backend.
...
We can instruction select exactly one instruction 'ret void'. Wow.
llvm-svn: 4284
2002-10-25 22:55:53 +00:00
Chris Lattner
517005c760
Build the X86 target as well
...
llvm-svn: 4283
2002-10-25 22:55:05 +00:00
Chris Lattner
9e33759f88
Initial checkin of codegen infrastructure for LLVM-JIT
...
llvm-svn: 4282
2002-10-25 22:54:41 +00:00
Chris Lattner
d6786b5f59
Prune #includes
...
llvm-svn: 4277
2002-10-25 02:01:33 +00:00
Chris Lattner
1e5e3f071e
Fix misspelling
...
llvm-svn: 4276
2002-10-25 01:43:26 +00:00
Nick Hildenbrandt
181dbf0851
Malloc prototyping now works even if the original file had its own prototype for malloc
...
llvm-svn: 4271
2002-10-23 18:59:40 +00:00
Chris Lattner
e97144120d
Tell PassManager that this pass does not invalidate the CFG so that dominator
...
information and Loop info will not have to be recomputed after this runs.
llvm-svn: 4269
2002-10-23 03:30:47 +00:00
Chris Lattner
42c66c4887
Minor cleanups
...
Make sure to have a pass name
llvm-svn: 4268
2002-10-23 01:12:01 +00:00
Chris Lattner
49f4242d2b
- Fix a really nasty bug in the bytecode reader that caused it to fail
...
reading bytecode files with > 255 types in them, but only when optimization
is enabled. This was caused by GCC shrinking an enum to a single byte
instead of a whole word.
llvm-svn: 4266
2002-10-23 00:51:54 +00:00
Chris Lattner
95fcefcb7e
Wow, for some reason, when reading bytecode from stdin, we were only reading
...
4 bytes at a time. Change this to read blocks of 4k
llvm-svn: 4265
2002-10-22 23:55:24 +00:00
Chris Lattner
5ae3bd630d
Ensure definate initialization
...
llvm-svn: 4263
2002-10-22 23:34:11 +00:00
Chris Lattner
ce64eddb71
- Two minor improvements to the MachineInstr class to reduce footprint and
...
overhead: Merge 3 parallel vectors into 1, change regsUsed hash_set to be a
bitvector. Sped up LLC a little less than 10% in a debug build!
llvm-svn: 4261
2002-10-22 23:16:21 +00:00
Chris Lattner
51a2c3cc2d
- Make sure to only keep track of mappings that the TD pass may need in the
...
future. This prevents having spurious map entries to nodes that we really
don't care about. This allows us to reenable the DeadNodeElim, which was
disabled.
llvm-svn: 4260
2002-10-22 16:01:03 +00:00
Chris Lattner
d90e74ae13
The callee is not correct, and confuses the TD pass. Null it out.
...
llvm-svn: 4259
2002-10-22 15:58:46 +00:00
Chris Lattner
820d971233
- Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
...
setPreservesCFG to be less confusing.
llvm-svn: 4255
2002-10-21 20:00:28 +00:00
Chris Lattner
155fffd350
Delete unused arguments to DSGraph::cloneInto method
...
llvm-svn: 4253
2002-10-21 19:50:29 +00:00
Chris Lattner
f76087336f
- Add "ResolvingCaller" to the CallSite record. This keeps track of which
...
function was finally able to resolve the function call. Adding this allows
the TD pass to actually work right!
- Temporarily disable dead node pruning. This will be reenabled soon.
llvm-svn: 4252
2002-10-21 19:47:18 +00:00
Chris Lattner
c6191df9af
Add another copy ctor form
...
llvm-svn: 4251
2002-10-21 15:32:34 +00:00
Chris Lattner
78c1e7d83c
As it turns out, we don't need a fully generic mapping copy ctor, we just need
...
something that maps through a std::map. Since this simplified the client and
implementation code, do so now.
llvm-svn: 4250
2002-10-21 15:04:18 +00:00
Chris Lattner
32438d8c84
Don't create a new node for every reference to a global. This caused a huge
...
node explosion that doesn't help anything at all. In previous versions of
the representation this DID help, but not anymore.
llvm-svn: 4249
2002-10-21 13:51:30 +00:00
Chris Lattner
800b7e33df
Fix a confusing bug that caused return value and callee pointers to not
...
be printed!
llvm-svn: 4248
2002-10-21 13:47:57 +00:00
Chris Lattner
2f5a6d46ae
Remove some unneccesary 'using' directives
...
llvm-svn: 4246
2002-10-21 13:31:48 +00:00
Chris Lattner
80e1a74820
Fix bug with prior checkin
...
llvm-svn: 4242
2002-10-21 02:18:55 +00:00
Chris Lattner
5c3ce31e1f
- Make DSCallSite not inherit from std::vector. Renamed methods slightly.
...
Make copy ctor have two versions to avoid dealing with conditional template
argument. DSCallSite ctor now takes all arguments instead of taking one
and being populated later.
llvm-svn: 4240
2002-10-21 02:08:03 +00:00
Chris Lattner
faa756ecee
Avoid extra copy
...
llvm-svn: 4239
2002-10-20 22:12:06 +00:00
Chris Lattner
3af17ce2cf
Simplify code a bit, add comment flyer
...
llvm-svn: 4238
2002-10-20 22:11:44 +00:00
Chris Lattner
fd16b72fc7
Split some long lines
...
llvm-svn: 4237
2002-10-20 22:11:17 +00:00
Vikram S. Adve
e85319693e
Remove spurious caller pointer in DSCallSite.
...
Also add functions to access pointer argument nodes cleanly.
llvm-svn: 4235
2002-10-20 21:41:02 +00:00
Chris Lattner
c94855e46b
This function can be static
...
llvm-svn: 4234
2002-10-20 20:39:31 +00:00
Chris Lattner
07d69052f8
Fix previous checkin :(
...
llvm-svn: 4233
2002-10-20 20:39:17 +00:00
Chris Lattner
28bef38c56
Avoid extra callSite copy
...
llvm-svn: 4232
2002-10-20 20:32:13 +00:00
Chris Lattner
43301680aa
Print the array flag
...
llvm-svn: 4231
2002-10-20 20:29:10 +00:00
Vikram S. Adve
dc9e142686
Added a first-class representation for each call site that can be
...
used in the DS graphs. Essentially, what was vector<DSNodeHandle>
before is now a DSCallSite with the same vector, plus pointers to the
CallInst and the caller Function. The special-purpose class
BUDataStructure::CallSite is no longer needed.
llvm-svn: 4228
2002-10-20 18:07:37 +00:00
Chris Lattner
f931f6b5c7
Convert typerec to be a structure instead of a pair
...
llvm-svn: 4226
2002-10-18 18:22:46 +00:00
Chris Lattner
ac2de97c75
Print Mod/ref info
...
llvm-svn: 4224
2002-10-17 22:13:28 +00:00
Chris Lattner
b4e800aabf
Calculate mod/ref info
...
llvm-svn: 4223
2002-10-17 22:13:19 +00:00
Chris Lattner
bf25578f02
Remove more obsolete code
...
llvm-svn: 4221
2002-10-17 20:53:12 +00:00
Chris Lattner
b182216df8
* Make the DSGraph cloner automatically merge global nodes
...
* BUClosure doesn't have to worry about global nodes
* TDClosure now works with global nodes
* Reenable DNE on TD pass, now that globals work right
llvm-svn: 4220
2002-10-17 20:09:52 +00:00
Chris Lattner
26783a5be5
* Apparently string::find doesn't work right on our sun boxes. Work around this.
...
llvm-svn: 4219
2002-10-17 16:22:08 +00:00
Chris Lattner
981c92a9e2
Remove obsolete code
...
llvm-svn: 4218
2002-10-17 04:58:10 +00:00
Chris Lattner
7c02ec2562
Enable incompleteness marking
...
llvm-svn: 4217
2002-10-17 04:57:28 +00:00
Chris Lattner
3ff5457b32
Really disable pool allocator
...
llvm-svn: 4216
2002-10-17 04:57:09 +00:00
Chris Lattner
f10327ebce
* First try at implementing TD pass this does not merge global nodes yet,
...
among other things.
* Significant rewrite of TD pass to avoid potentially N^2 algorithms if
possible. It is still not complete, but at least it's checked in now.
llvm-svn: 4215
2002-10-17 04:26:54 +00:00
Chris Lattner
6b5acda098
Reenable printing of TD analysis
...
llvm-svn: 4214
2002-10-17 04:24:30 +00:00
Chris Lattner
a1cfcf4dff
* Add data structures and code to track the call sites for each function
...
llvm-svn: 4213
2002-10-17 04:24:08 +00:00
Chris Lattner
ddebb4343e
Cleanup data structure graph printer, eliminate hard coded printing in
...
favor of generic printer.
llvm-svn: 4209
2002-10-17 01:02:46 +00:00
Chris Lattner
7b0ebe9983
Make sure to print out the call nodes as well
...
llvm-svn: 4203
2002-10-16 20:16:16 +00:00
Chris Lattner
8fad3eab59
Fix bug: CBackend/2002-10-16-External.ll
...
llvm-svn: 4201
2002-10-16 20:08:47 +00:00
Chris Lattner
fea9f0b786
* Print the "return" node in the graphs
...
llvm-svn: 4199
2002-10-16 02:04:36 +00:00
Chris Lattner
5274757b62
The second element of the iterator is really an offset, not a link
...
llvm-svn: 4196
2002-10-16 01:43:11 +00:00
Chris Lattner
b1c17ad7e8
Specify the graph name
...
llvm-svn: 4195
2002-10-16 01:34:28 +00:00
Chris Lattner
eb15c6d2b3
- DSGraph Printing Improvements:
...
* Print edge source labels again
* Override node shape to be Mrecord again, instead of just record.
llvm-svn: 4193
2002-10-16 01:18:27 +00:00
Chris Lattner
c6e5d688af
Fix bug: test/Regression/CBackend/2002-10-15-OpaqueTypeProblem.ll
...
llvm-svn: 4190
2002-10-16 00:08:22 +00:00
Chris Lattner
1961329140
- Fix bug: Assembler/2002-10-15-NameClash.ll
...
- Clean up code a bit, s/Method/Function/
llvm-svn: 4188
2002-10-15 21:41:14 +00:00
Chris Lattner
33100eddd2
- Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
...
Function::ParentSymTab. These aren't needed at all.
llvm-svn: 4186
2002-10-15 21:26:29 +00:00
Chris Lattner
6a1a65f9de
- Fix LLI so that it simulates the endianness of the target machine
...
correctly, despite the fact that the host machine might not be the same.
llvm-svn: 4180
2002-10-15 20:34:05 +00:00
Chris Lattner
aaf6ee80de
Make sure to escape \'s when they are output
...
llvm-svn: 4179
2002-10-15 19:56:24 +00:00
Chris Lattner
5156bba4c7
- Add an endianness field to the TargetData datastructure
...
llvm-svn: 4174
2002-10-14 22:41:13 +00:00
Vikram S. Adve
92ccbb9f27
Print "circular" warning message only in debug mode.
...
llvm-svn: 4170
2002-10-14 16:32:49 +00:00
Vikram S. Adve
4049a9a5de
Removed misleading const keyword.
...
llvm-svn: 4169
2002-10-14 16:32:24 +00:00
Vikram S. Adve
f5492b0c5b
Significant improvement: GEP used by a load or store no longer generates
...
a separate ADD; instead just use the indexed load/store instruction!
Also, a bug fix: folding a GEP with a leading non-zero index with
its predecessor was incorrect: now it only happens if the predecessor
is pointing to an indexable type (aka SequentialType).
llvm-svn: 4168
2002-10-14 16:30:55 +00:00
Chris Lattner
74cb2d2503
Allow emission of names that start with an underscore. This is needed to
...
interface with code that uses symbols in the ansi-c protected namespace. In
most cases this comes from system header files, such as stdio.h. In particular,
without this change, a reference to the __iob symbol is mangled into ll_iob,
which is not resolved by libc.
llvm-svn: 4165
2002-10-14 06:14:18 +00:00
Chris Lattner
ca1725d3c8
Clean up code a bit, no functionality changes.
...
llvm-svn: 4162
2002-10-14 03:34:17 +00:00
Chris Lattner
2862d2ec71
There is no way to guarantee that constants are not forward referenced.
...
Handle forward referenced constants in a general way. This fixes bug:
Assembler/2002-10-13-ConstantEncodingProblem.llx and allows the SPEC
197.parser benchmark to be built
llvm-svn: 4161
2002-10-14 03:33:02 +00:00
Chris Lattner
163b890dfb
- Dramatically simplify the Constant::mutateReferences implementation,
...
allowing it to be called on all constant types (structures/arrays)
llvm-svn: 4160
2002-10-14 03:30:23 +00:00
Chris Lattner
8022a0f57c
This loop executed exactly one time, turn it into straightline code
...
llvm-svn: 4159
2002-10-14 03:28:42 +00:00
Chris Lattner
251a7e6231
Minor cleanups, no changes to functionality
...
llvm-svn: 4157
2002-10-14 00:48:57 +00:00
Vikram S. Adve
a202c0dbfa
Don't try to compute the size of an "array" element if the index is 0:
...
the size may be unknown, and is not needed.
llvm-svn: 4153
2002-10-13 21:47:44 +00:00
Chris Lattner
149376dee5
- Change Function's so that their argument list is populated when they are
...
constructed. Before, external functions would have an empty argument list,
now a Function ALWAYS has a populated argument list.
llvm-svn: 4149
2002-10-13 20:57:00 +00:00
Chris Lattner
69ce8674b5
- Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
...
reflect the fact that it's a range being defined.
llvm-svn: 4147
2002-10-13 19:39:16 +00:00
Chris Lattner
b0f38789da
Halfway conversion from custom printing to GraphWriter printing
...
llvm-svn: 4146
2002-10-13 19:31:57 +00:00
Chris Lattner
5f9f4e3aac
Account for global variables resolved more accurately.
...
llvm-svn: 4143
2002-10-13 17:30:30 +00:00
Chris Lattner
88dbc4dbe9
Use methods that are more explanatory
...
llvm-svn: 4142
2002-10-13 17:12:47 +00:00
Vikram S. Adve
9e5eb46362
Use vectors instead of hash_maps for issueGaps and conflictLists.
...
These hash lookups were a major sink of time because they happen so often!
Also, add option to disable scheduling.
llvm-svn: 4138
2002-10-13 00:40:37 +00:00
Vikram S. Adve
f8c6e3db55
Major bug fix: was not adding CD edges for RETURNs!
...
llvm-svn: 4137
2002-10-13 00:39:22 +00:00
Vikram S. Adve
d77030bd76
Use vectors instead of hash_maps for issueGaps and conflictLists.
...
These hash lookups were a major sink of time because they happen so often!
llvm-svn: 4136
2002-10-13 00:37:46 +00:00
Vikram S. Adve
05ee0819a7
Run LICM before GCSE!
...
llvm-svn: 4135
2002-10-13 00:34:10 +00:00
Vikram S. Adve
10d8164013
Several major fixes, particularly in emitting constant aggregates:
...
(1) Padding bytes between structure fields (for alignment) were never
being emitted into the constant pool so the layout did not match!
(2) In printing constants, structures containing structures or arrays
were never handled.
(3) Support new model for external/uninitialized/initialized globals.
Uninitialized globals are no longer emitted since they are external.
Initialized globals may go either in .bss or in .data.
llvm-svn: 4134
2002-10-13 00:32:18 +00:00
Vikram S. Adve
78044fbc8e
Don't use %l0 for large operands to a SAVE since it is needed *before* SAVE!
...
We now use %g1 instead since that is shared and volatile.
llvm-svn: 4133
2002-10-13 00:24:06 +00:00
Vikram S. Adve
f4f7292b4e
Don't mark JMPLCALL and JMPLRET as branches.
...
llvm-svn: 4132
2002-10-13 00:22:32 +00:00
Vikram S. Adve
d2dc60e5d9
(1) Try to evaluate constant when multiplying 2 constants.
...
(2) Use intelligent multiply selection code for array allocas.
(3) Don't use cache padding for alloca'd stack slots!
(4) Bug fix in handling call arguments: was not copying sixth FP arg
to int reg. when calling a function with no prototype.
llvm-svn: 4130
2002-10-13 00:18:57 +00:00
Vikram S. Adve
d00beecb59
Eliminate duplicate target pointer in SparcRegInfo.
...
llvm-svn: 4129
2002-10-13 00:06:04 +00:00
Vikram S. Adve
879eac9fa1
Eliminate duplicate target pointer. Also add a few assertions.
...
llvm-svn: 4128
2002-10-13 00:05:30 +00:00
Vikram S. Adve
ea31dc707f
Make sure to handle small negative values hiding as large unsigned longs --
...
this is a common case created by the front-end.
llvm-svn: 4127
2002-10-13 00:04:26 +00:00
Vikram S. Adve
4ef6cce821
Major fix: extract ConstantExpr nodes and decompose them into symbolic
...
instructions so that (a) constant folding is done automatically before
code generation, and (b) selection does not have to deal with them.
Also, check for ConstantPointerRefs in additional to GlobalValues
when creating a GEP to load a global address.
llvm-svn: 4126
2002-10-13 00:01:57 +00:00
Anand Shukla
12b05f3880
Changed to external global var
...
llvm-svn: 4120
2002-10-12 20:33:47 +00:00
Nick Hildenbrandt
fa6e71e31d
Instead of adding stdlib we just prototype malloc correctly.
...
llvm-svn: 4118
2002-10-11 21:40:44 +00:00
Nick Hildenbrandt
8d354423fc
Sun requires you to include stdlib to use malloc
...
llvm-svn: 4117
2002-10-11 18:41:44 +00:00
Vikram S. Adve
3e54d6c3be
Major bug fix: spill code for an instruction in a delay slot was
...
merrily being inserted before/after the instruction!
llvm-svn: 4116
2002-10-11 16:12:40 +00:00
Vikram S. Adve
ffc9dd5c0d
Don't pad variables in stack slots for performance!
...
llvm-svn: 4115
2002-10-11 16:10:53 +00:00
Vikram S. Adve
b52220cd21
Use PARALLEL_DIRS.
...
llvm-svn: 4114
2002-10-11 16:08:17 +00:00
Misha Brukman
33022f07bb
Added capability to get execution count of a loop if it is a predictable
...
number of iterations.
llvm-svn: 4113
2002-10-11 05:34:32 +00:00
Misha Brukman
3845be203d
Added helper functions in LoopInfo: isLoopExit and numBackEdges.
...
llvm-svn: 4112
2002-10-11 05:31:10 +00:00
Chris Lattner
1a535e18cd
Stop using DataStructureGraph.h
...
llvm-svn: 4106
2002-10-10 20:33:46 +00:00
Chris Lattner
eac4dcd0bd
- Dramatically simplify the ConstantMerge code now that
...
Value::replaceAllUsesWith works with constants correctly.
llvm-svn: 4104
2002-10-09 23:16:04 +00:00
Chris Lattner
2c6abeac43
- Make Value::replaceAllUsesWith work with constants correctly. This fixes
...
bug FuncResolve/2002-08-19-ResolveGlobalVars.ll and gzip looks better.
llvm-svn: 4103
2002-10-09 23:12:59 +00:00
Chris Lattner
b1dd9bbc68
- Add new Constant::replaceUsesOfWithOnConstant which has an end result
...
similar to User::replaceUsesOfWith but actually does the right thing for
constants.
llvm-svn: 4102
2002-10-09 23:12:25 +00:00
Chris Lattner
013eca003a
Almost a complete rewrite of FunctionResolution to now resolve functions
...
and global variables.
This fixes bug: FuncResolve/2002-08-19-ResolveGlobalVarsEasier.ll
And bug: SingleSource/UnitTests/2002-10-09-ArrayResolution.c
Note that this does not fix bug:
FunctionResolve/2002-08-19-ResolveGlobalVars.ll because replaceAllUsesWith
breaks when a constantexpr is pointing to the thing being replaced. This
is more of an infrastructure problem than anything.
llvm-svn: 4099
2002-10-09 21:10:06 +00:00
Chris Lattner
fa01a52149
Minor, non-functionality changing, formatting fix
...
llvm-svn: 4091
2002-10-09 00:25:32 +00:00
Chris Lattner
6023f638a1
- Remove Value::use_remove
...
llvm-svn: 4090
2002-10-09 00:25:05 +00:00
Chris Lattner
a4e2653cd7
- Rename MTy to FTy (no methods exist anymore)
...
- Fix bug: LevelRaise/2002-10-08-VarArgCallInfLoop.ll
llvm-svn: 4088
2002-10-09 00:16:00 +00:00
Chris Lattner
3ea0c188b7
Fix NASTY N^2 behavior that was causing the gzip benchmark to take forever to
...
assemble. Now we scan the use-list from the back when removing users instead
of from the front.
llvm-svn: 4086
2002-10-08 23:46:55 +00:00
Chris Lattner
0d779712e7
Fix bug: Assembler/2002-10-08-LargeArrayPerformance.ll by using
...
std::vector::reserve when possible
llvm-svn: 4085
2002-10-08 23:33:52 +00:00
Chris Lattner
a185db3d72
- Fix bug: LevelRaise/2002-10-08-VarArgCall.ll
...
llvm-svn: 4083
2002-10-08 22:19:25 +00:00
Chris Lattner
b7368500dc
- Fix bug: cee/2002-10-07-NoImmediateDominator.ll
...
llvm-svn: 4081
2002-10-08 21:53:51 +00:00
Chris Lattner
caf5b504a3
Changes to support PHINode::removeIncoming changes
...
llvm-svn: 4080
2002-10-08 21:36:34 +00:00
Chris Lattner
a704ac8a66
Changes to support PHINode::removeIncoming changes
...
llvm-svn: 4079
2002-10-08 21:36:33 +00:00
Chris Lattner
fae98a2d28
- Change PHINode::removeIncomingValue to delete the phi node if the last
...
incoming value is removed!
llvm-svn: 4078
2002-10-08 21:34:58 +00:00
Chris Lattner
736709feda
- Checkin LARGE number of Changes to CEE pass that will make it much more
...
powerful, but that are largely disabled. The basic idea here is that it
is trying to forward branches across basic blocks that have PHI nodes in
it, which are crucial to be able to handle cases like whet.ll.
Unfortunately we are not updating SSA correctly, causing sim.c to die, and I
don't have time to fix the regression now, so I must disable the
functionality.
llvm-svn: 4077
2002-10-08 21:34:15 +00:00
Chris Lattner
5ac72defc9
Expose isCriticalEdge & SplitCriticalEdge methods from crit-edges pass
...
llvm-svn: 4075
2002-10-08 21:06:27 +00:00
Chris Lattner
acb038e5c7
Expose new "recalculate" method from dominatorset
...
llvm-svn: 4074
2002-10-08 19:12:08 +00:00
Chris Lattner
394617f38b
It is illegal for PHI nodes to have zero values, delete the code to handle them
...
llvm-svn: 4071
2002-10-08 17:07:39 +00:00
Chris Lattner
2e0fb39d87
Fold ashr -1, X into -1
...
llvm-svn: 4070
2002-10-08 16:16:40 +00:00
Chris Lattner
68f21bcb1b
Non-functionality change just to make it more clear what is going on
...
llvm-svn: 4060
2002-10-07 18:34:32 +00:00
Chris Lattner
d131986b0f
Global variables are now external if they don't have initializers, not
...
"uninitialized"
llvm-svn: 4052
2002-10-06 22:48:09 +00:00
Chris Lattner
78bc0fa29f
Check that we don't have external varaibles with internal linkage
...
llvm-svn: 4051
2002-10-06 22:47:32 +00:00
Chris Lattner
e2dd92be96
The parser now accepts "external" global variables, in addition to the backwards
...
compatible "uninitialized" global variables
llvm-svn: 4050
2002-10-06 22:45:09 +00:00
Chris Lattner
4cd9df88a7
PHI nodes are not allowed to exist with zero incoming values, check that
...
there aren't any like this.
llvm-svn: 4044
2002-10-06 21:00:31 +00:00
Vikram S. Adve
2cc6609e25
Bug fix: In preventing static global variables from being printed twice,
...
I also prevented external globals from being printed twice, but they
should (extern declaration and definition).
llvm-svn: 4043
2002-10-05 23:43:10 +00:00
Anand Shukla
b8aef8eff8
Added #include<unistd.h> to compile with solaris gcc3.2
...
llvm-svn: 4042
2002-10-04 23:57:01 +00:00
Anand Shukla
195d3fb37f
added cast to unsigned to compile with gcc3.2 (sparc)
...
llvm-svn: 4041
2002-10-04 23:56:18 +00:00
Chris Lattner
d7b3bb0fa4
Handle post dominance correctly in the case where blocks do not have a path to
...
the exit node.
llvm-svn: 4038
2002-10-04 14:50:20 +00:00
Chris Lattner
2cedf1ce82
Fix a nasty problem with dominance calculation for unreachable blocks.
...
If we had a CFG that look like Entry -> B, Unreachable -> B, then we would
not correctly determine that Entry dominated B, because Entry did not
apparently dominate "unreachable". This patch fixes this by making the entry
node dominate all blocks, including unreachable ones.
llvm-svn: 4037
2002-10-04 14:45:48 +00:00
Chris Lattner
9df1cf3034
Prune function nodes that are no longer referenced due to inlining
...
llvm-svn: 4036
2002-10-03 21:55:28 +00:00
Chris Lattner
9dfb9f44cc
sgefa uses truely huge data structures nodes. Only print part of them if they
...
are so big
llvm-svn: 4035
2002-10-03 21:55:13 +00:00
Chris Lattner
4ee4381a23
Handle bug exposed by power benchmark
...
llvm-svn: 4033
2002-10-03 21:06:38 +00:00
Nick Hildenbrandt
afff0a25b7
Add parens around constant calls to getelemptr to properly associate the reference
...
llvm-svn: 4032
2002-10-03 20:47:24 +00:00
Chris Lattner
c9c681e4f5
Reimplement/port the Bottom Up Closure pass
...
llvm-svn: 4031
2002-10-03 20:38:41 +00:00
Chris Lattner
3f69054dd5
DataStructure.h doesn't include DSGraph.h
...
llvm-svn: 4029
2002-10-02 22:14:38 +00:00
Nick Hildenbrandt
2d3eb5a349
I was wrong on the removing of those references on the last commit.
...
llvm-svn: 4023
2002-10-02 21:14:33 +00:00
Chris Lattner
0313db6b02
* Implement the getc() function
...
* Support usage of stdin, stdout & stderr correctly in LLI!
llvm-svn: 4022
2002-10-02 21:12:13 +00:00
Chris Lattner
8b952fa7ae
Cleanup #includes, expose module
...
llvm-svn: 4021
2002-10-02 21:11:16 +00:00
Chris Lattner
dabbf17b47
Expose TD to ExternalFunctions.cpp
...
llvm-svn: 4020
2002-10-02 21:10:48 +00:00
Chris Lattner
58185f2df9
- Print the predecessors of a basic block instead of the number of uses of
...
the block in the AsmWriter
llvm-svn: 4019
2002-10-02 19:38:55 +00:00
Chris Lattner
0f5346d743
Fix bug: 2002-10-02-SignExtensionProblem.ll
...
llvm-svn: 4017
2002-10-02 18:53:14 +00:00
Nick Hildenbrandt
bff2adb2a4
Removed unneeded reference and dereferences.
...
llvm-svn: 4016
2002-10-02 18:34:51 +00:00
Nick Hildenbrandt
e07698b492
Cleaned up my last check-in.
...
llvm-svn: 4014
2002-10-02 18:32:35 +00:00
Nick Hildenbrandt
e0ba1f25b6
No longer include malloc.h. If protoypes are needed for memory functions they will be present in the byte code and the generated c as well.
...
llvm-svn: 4013
2002-10-02 18:20:18 +00:00
Chris Lattner
c4d2ad21bf
* Implement fully general merging of array subscripts on demand! This
...
does not handle the initial pointer index case yet though.
llvm-svn: 4012
2002-10-02 06:24:36 +00:00
Chris Lattner
4e37455a69
When printing DS nodes, print the mergemap index as well to allow easier
...
debugging of merging process.
llvm-svn: 4010
2002-10-02 05:17:55 +00:00
Chris Lattner
0b2a6e00d1
* Significant rework of DSNode to support arbitrary aliasing due to merging
...
* Now all and any bytes of a DSNode can be merged together individually. This
is neccesary to support the full generality of C and support aliasing
correctly.
llvm-svn: 4008
2002-10-02 04:57:39 +00:00
Chris Lattner
c2996d9a8b
Changes to work with Statistics rework
...
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
* Broke constructor to take two const char * arguments instead of one, so
that indendation can be taken care of automatically.
* Sort the list by pass name when printing
* Make sure to print all statistics as a group, instead of randomly when
the statistics dtors are called.
* Updated ProgrammersManual with new semantics.
llvm-svn: 4004
2002-10-01 22:40:31 +00:00
Chris Lattner
bf3a099a62
Updates to work with recent Statistic's changes:
...
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
* Broke constructor to take two const char * arguments instead of one, so
that indendation can be taken care of automatically.
* Sort the list by pass name when printing
* Make sure to print all statistics as a group, instead of randomly when
the statistics dtors are called.
* Updated ProgrammersManual with new semantics.
llvm-svn: 4002
2002-10-01 22:38:41 +00:00
Chris Lattner
3cf3782bc0
Updates to work with recent Statistic's changes:
...
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
* Broke constructor to take two const char * arguments instead of one, so
that indendation can be taken care of automatically.
* Sort the list by pass name when printing
* Make sure to print all statistics as a group, instead of randomly when
the statistics dtors are called.
* Updated ProgrammersManual with new semantics.
llvm-svn: 4001
2002-10-01 22:38:37 +00:00
Chris Lattner
f242bec91b
Build subdirs in parallel
...
llvm-svn: 4000
2002-10-01 22:36:35 +00:00
Chris Lattner
c758fe6b72
- Rework Statistics:
...
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
* Broke constructor to take two const char * arguments instead of one, so
that indendation can be taken care of automatically.
* Sort the list by pass name when printing
* Make sure to print all statistics as a group, instead of randomly when
the statistics dtors are called.
llvm-svn: 3999
2002-10-01 22:35:45 +00:00
Chris Lattner
d3121eb8cb
Initial checkin of Steensgaards context insensitive flow insensitive
...
alias analysis
llvm-svn: 3997
2002-10-01 22:34:12 +00:00
Chris Lattner
193e6924ca
Checkin some major reworks of data structure analysis. This is not done,
...
nor does it work very well, but I need to get it checked in before I break
the tree unintentionally.
llvm-svn: 3996
2002-10-01 22:33:50 +00:00
Chris Lattner
52db271374
Make sure to use the TimerGroup that we created!
...
llvm-svn: 3995
2002-10-01 20:12:06 +00:00
Chris Lattner
d5fc9023a8
Make sure not to count the PassManager wrapers
...
llvm-svn: 3994
2002-10-01 20:08:11 +00:00
Chris Lattner
af751b8e72
Factor timer code out of PassManager implementation, into a generic interface
...
exposed by Support/Timer.h.
llvm-svn: 3993
2002-10-01 19:54:07 +00:00
Chris Lattner
6dad11f6c0
Checkin generic interval timer support
...
llvm-svn: 3992
2002-10-01 19:36:54 +00:00
Nick Hildenbrandt
386834b2f1
Fixed to properly escape quotes in strings.
...
llvm-svn: 3991
2002-09-30 21:11:55 +00:00
Chris Lattner
1931788143
Minor tweak
...
llvm-svn: 3985
2002-09-29 22:59:29 +00:00
Vikram S. Adve
75b4a29613
Bug fix in folding getElementPtr instructions: don't fold one into
...
a predecessor if it has a non-zero first index and the predecessor
ends with a struct index.
llvm-svn: 3982
2002-09-29 22:55:05 +00:00
Chris Lattner
6b6f540959
Fix a problem that was caused by stale analyses being in CurrentAnalyses
...
llvm-svn: 3981
2002-09-29 22:50:22 +00:00
Chris Lattner
05e86302f4
Fix bug in LICM that caused the previous big win. :(
...
llvm-svn: 3980
2002-09-29 22:26:07 +00:00
Chris Lattner
6443769b34
Hoist the contents of Loops in depth first order in the dominator tree,
...
rather than in random order. This causes LICM to be DRAMATICALLY more
effective. For example, on bzip2.c, it is able to hoist 302 loads and
2380 total instructions, as opposed to 44/338 before. This obviously
makes other transformations much more powerful as well!
llvm-svn: 3978
2002-09-29 21:46:09 +00:00
Chris Lattner
467a9e84c4
Fix printing of loop information
...
llvm-svn: 3977
2002-09-29 21:43:04 +00:00
Chris Lattner
ae3ac7e1c9
Improve printing of dominator sets
...
llvm-svn: 3976
2002-09-29 21:42:42 +00:00
Chris Lattner
03a9e15a9f
Fix major bugs in dominator set & tree information updating
...
llvm-svn: 3975
2002-09-29 21:41:38 +00:00
Vikram S. Adve
be55f2dd2c
Convert DIRS to PARALLEL_DIRS. They can be built independently.
...
llvm-svn: 3972
2002-09-29 11:52:14 +00:00
Vikram S. Adve
9011903ee2
Added a couple of helper methods for live range construction.
...
llvm-svn: 3970
2002-09-28 17:05:43 +00:00
Vikram S. Adve
ed2df3ecf8
Live ranges for Return value and return address of a Call are now
...
created here, simply by handling all implicit operands (which should
have been done anyway).
llvm-svn: 3969
2002-09-28 17:05:22 +00:00
Vikram S. Adve
8076fe87b7
Fixed method getReturnValue(): it should return NULL if the
...
callee does not return a value.
llvm-svn: 3968
2002-09-28 17:03:54 +00:00
Vikram S. Adve
8fef3b8033
Fixed incorrect assertion: spill code for function ptr should be
...
handled like normal operands, not like other call arguments.
llvm-svn: 3967
2002-09-28 17:02:40 +00:00
Vikram S. Adve
d76d82b40f
Return address register should be marked as "result" for the JMPL instruction
...
since it is defined by the instruction.
llvm-svn: 3966
2002-09-28 17:00:15 +00:00
Vikram S. Adve
6d1036d41b
Live ranges for Return value and return address of a Call are no longer
...
created here. Instead they are created in LiveRangeInfo.cpp. This
simplifies the code here quite a bit.
llvm-svn: 3965
2002-09-28 16:59:05 +00:00
Vikram S. Adve
cce628aeaf
Simplified code that handles call args and rets, so it no longer
...
needs the RegClass list to be passed in.
llvm-svn: 3964
2002-09-28 16:56:59 +00:00
Vikram S. Adve
4bb9866dc5
Simplify Call translation slightly.
...
llvm-svn: 3963
2002-09-28 16:55:41 +00:00
Vikram S. Adve
34d16d64b0
Overhaul integer conversions to match C++ ISO standard.
...
Don't allow direct FP-to-uint conversion (must be eliminated by preselection).
Address arithmetic for arrays is now entirely 64-bit so no sign-ext needed.
llvm-svn: 3961
2002-09-27 14:33:08 +00:00
Vikram S. Adve
40e2347b90
Modify operand order for Create{Sign,Zero}ExtensionInstructions.
...
llvm-svn: 3960
2002-09-27 14:29:45 +00:00
Vikram S. Adve
d238de02c7
Bug fix: some redundant copies were not being deleted after detection :-|.
...
llvm-svn: 3959
2002-09-27 14:27:37 +00:00
Vikram S. Adve
66303bb9a5
Sign-extend integer constants from original type size to 64 bits!
...
llvm-svn: 3958
2002-09-27 14:26:20 +00:00
Vikram S. Adve
46aeb8c7c2
Decompose FP-to-UInt casts into FP-to-ULong-toUInt.
...
llvm-svn: 3957
2002-09-27 14:24:45 +00:00
Chris Lattner
647df647e1
First try at implementing the AliasSetTracker class. I'm sure it will need
...
revision as I start to use it though.
llvm-svn: 3954
2002-09-26 21:49:07 +00:00
Chris Lattner
d57f3f5073
- Further cleanups of LICM pass, remove extra work from previous implementation
...
- Do not clone instructions then insert clone outside of loop. Just move them.
llvm-svn: 3951
2002-09-26 19:40:25 +00:00
Chris Lattner
f64f2d3fb3
Improve comments, doxygenize more
...
llvm-svn: 3950
2002-09-26 16:52:07 +00:00
Chris Lattner
718b221ff8
Clean up LICM significantly now that it is guaranteed to have loop preheaders
...
llvm-svn: 3947
2002-09-26 16:38:03 +00:00
Chris Lattner
ca056914c6
Change pass name to something sane
...
llvm-svn: 3946
2002-09-26 16:37:37 +00:00
Chris Lattner
d771fdfd75
Loop invariant code motion now depends on the LoopPreheader pass. Dead code
...
has not yet been removed.
llvm-svn: 3945
2002-09-26 16:19:31 +00:00
Chris Lattner
bedbd6bc16
- Cleanup break-crit-edges pass by making SplitCriticalEdge a member method.
...
- break-crit-edges pass does not invalidate loop-preheader pass.
llvm-svn: 3944
2002-09-26 16:18:51 +00:00
Chris Lattner
61992f66d8
Checkin new loop-preheader insertion pass.
...
llvm-svn: 3942
2002-09-26 16:17:31 +00:00
Chris Lattner
3524f58309
Fix printing of loop information
...
llvm-svn: 3941
2002-09-26 16:15:54 +00:00
Chris Lattner
98ae0f1897
- Add methods to ImmediateDominators & DominatorTree to allow updates
...
- Make DominatorTree::Node not inherit from std::vector
llvm-svn: 3939
2002-09-26 16:14:41 +00:00
Chris Lattner
08373d1c9c
- Add new methods to LoopInfo: getLoopPreheader, addBasicBlockToLoop.
...
These allow extra information to be easily gathered, and loopinfo to be
updated.
llvm-svn: 3936
2002-09-26 05:32:50 +00:00
Chris Lattner
4dfede8070
- Add new ctor to BasicBlock to allow insertion before any BB, not just at
...
the end of the function.
llvm-svn: 3934
2002-09-26 05:03:22 +00:00
Chris Lattner
870a4a5bb4
Converted SimpleStructMutation to take TargetData as a required pass.
...
llvm-svn: 3932
2002-09-26 00:17:21 +00:00
Chris Lattner
3cab9f0396
Change LowerAllocations pass to 'require' TargetData instead of it being
...
passed in.
llvm-svn: 3929
2002-09-25 23:47:47 +00:00
Chris Lattner
09cfdcb1a3
Convert TargetData to be an ImmutablePass
...
llvm-svn: 3927
2002-09-25 23:46:55 +00:00
Chris Lattner
ceae380b2c
Convert BasicVN to be an ImmutablePass
...
llvm-svn: 3924
2002-09-25 22:27:25 +00:00
Chris Lattner
480b37d479
* Fix ugly bug in previous checkin where I reused the name 'i' one too many times
...
* Print out immutable passes in the -debug-pass=Structure report.
llvm-svn: 3923
2002-09-25 22:26:52 +00:00
Chris Lattner
ee0788d42d
Add support for ImmutablePasses, which are not run, and cannot be
...
invalidated.
llvm-svn: 3921
2002-09-25 21:59:11 +00:00
Nick Hildenbrandt
88e87783b8
Strings now handled correctly.
...
llvm-svn: 3920
2002-09-25 20:29:26 +00:00
Chris Lattner
b408154f5f
- Fix bug: Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll
...
llvm-svn: 3917
2002-09-24 21:19:41 +00:00
Chris Lattner
4357e54760
Eliminate extraneous #include
...
llvm-svn: 3916
2002-09-24 21:18:40 +00:00
Chris Lattner
d6dcd8ec32
Fix bug: SimplifyCFG/2002-09-24-PHIAssertion.ll
...
llvm-svn: 3913
2002-09-24 16:09:17 +00:00
Chris Lattner
c05ad96803
- Do not expose Critical Edge breaking mechanics outside the BCE pass, thus
...
removing it from Transforms/Local.h and from Transforms/Utils/*
llvm-svn: 3911
2002-09-24 15:52:01 +00:00
Chris Lattner
75f80bd0b6
- Do not expose Critical Edge breaking mechanics outside the BCE pass, thus
...
removing it from Transforms/Local.h and from Transforms/Utils/*
llvm-svn: 3910
2002-09-24 15:51:56 +00:00
Chris Lattner
b4e7e22be3
Correlated Exprs pass now requires BCE pass instead of doing it manually
...
llvm-svn: 3908
2002-09-24 15:43:56 +00:00
Chris Lattner
4bec665b09
- Expose passinfo from BreakCriticalEdges pass so that it may be "Required"
...
by other passes. Make BCE pass be in anonymous namespace now.
llvm-svn: 3907
2002-09-24 15:43:12 +00:00
Chris Lattner
5325c5f340
Minor cleanups
...
llvm-svn: 3904
2002-09-24 00:09:26 +00:00
Chris Lattner
b03832d5d0
Add new BreakCriticalEdges pass
...
llvm-svn: 3903
2002-09-24 00:08:39 +00:00
Chris Lattner
c952e4558b
Make users of FindUsedTypes not have problems with linkage. This fixes
...
Cwriter.
llvm-svn: 3900
2002-09-24 00:07:21 +00:00
Chris Lattner
555518c70f
Optimize away cases like:
...
%cast109 = cast uint %cast212 to short ; <short> [#uses=1]
%cast214 = cast short %cast109 to uint ; <uint> [#uses=1]
%cast215 = cast uint %cast214 to short ; <short> [#uses=1]
llvm-svn: 3897
2002-09-23 23:39:43 +00:00
Chris Lattner
28d103548d
Fix: ConstantMerge/2002-09-23-CPR-Update.ll
...
Basically, this bug boiled down to calling replaceUsesOfWith on a constant,
which changed it's shape in an illegal way. This pass now goes through all
of the trouble neccesary to do the replacement on constants.
llvm-svn: 3895
2002-09-23 23:00:46 +00:00
Nick Hildenbrandt
9cedce62ee
Parenthesis are now added to casts of type array.
...
llvm-svn: 3892
2002-09-23 21:02:50 +00:00
Chris Lattner
7ccb217f21
* Fix bug: CorrelatedExprs/2002-09-23-PHIUpdateBug.ll
...
* Make sure "Changed" is updated correctly
llvm-svn: 3891
2002-09-23 20:06:22 +00:00
Chris Lattner
4037a261d8
Insert resolved constants into the global map so they are reused correctly.
...
This bug was exposed linking the SPEC benchmark suite.
llvm-svn: 3888
2002-09-23 18:14:15 +00:00
Vikram S. Adve
8e6e1816c0
Put intermediate source files in a subdirectory here instead of with
...
object files. Also,
llvm-svn: 3884
2002-09-23 13:12:28 +00:00
Vikram S. Adve
7765a4a4f6
Disable reassociation pass in LLC until it is fixed.
...
llvm-svn: 3883
2002-09-23 12:55:50 +00:00
Chris Lattner
facc751260
Don't insert a PHI node to merge "returns" from an inlined function if there
...
is only a single return from the function!
llvm-svn: 3878
2002-09-22 18:41:25 +00:00
Anand Shukla
4b6bd16c2b
Changed codegen to add 2 empty slots at the top of stack using StackSlots pass
...
llvm-svn: 3873
2002-09-21 05:01:21 +00:00
Anand Shukla
ca15c99c4d
Initial version: it adds 2 empty slots at the top of stack
...
llvm-svn: 3872
2002-09-21 04:58:26 +00:00
Chris Lattner
230d832e38
Fix cwriter to not output FP constants in ascii, output them in hex instead.
...
This fixes a number of FP precision problems, making the output of the
power benchmark closer to the right answer.
Unfortunately, this only addresses FP constants used directly in functions.
Constants referred to by global constants (such as an array of FP values)
aren't helped by this. Until this happens power won't work.
llvm-svn: 3871
2002-09-20 23:26:33 +00:00
Chris Lattner
79ea4c4aa2
Fix bug: 2002-09-20-VarArgPrototypes.ll
...
llvm-svn: 3870
2002-09-20 22:32:30 +00:00
Anand Shukla
8137896962
Changed uchar to unsigned char in function ParseBytecodeBuffer, because seemingly it affects opt in uncertain ways :)
...
llvm-svn: 3866
2002-09-20 20:57:54 +00:00
Anand Shukla
77dca14403
Added checking threshold
...
llvm-svn: 3864
2002-09-20 16:44:35 +00:00
Chris Lattner
2895a2f421
Fix output of typedefs to avoid syntax errors.
...
* We now can correctly Cify the Olden-power benchmark
llvm-svn: 3860
2002-09-20 15:20:24 +00:00
Chris Lattner
7bd37ed1a6
* Add a couple of comments to the output c code
...
* _FIX_ infinite recursion problem, due to typedefs of a structure being
printed before the structure.
llvm-svn: 3859
2002-09-20 15:18:30 +00:00
Chris Lattner
32d812feff
Another change that doesn't affect functionality. Since we are only looking
...
at types in the symbol table, only traverse the type plane, saving a loop nest.
llvm-svn: 3858
2002-09-20 15:12:13 +00:00
Chris Lattner
9a973b4f6a
Make the StructPrinted set only take memory when it's being used.
...
rename parseStruct to printContainedStructs
llvm-svn: 3857
2002-09-20 15:05:40 +00:00
Chris Lattner
37bd117997
No functionality changes, primarily just changing tab indentation to space
...
indentation
llvm-svn: 3856
2002-09-20 14:56:54 +00:00
Vikram S. Adve
5cc5d4b19a
Add method IGNode::getCombinedDegree to count the sum of the degrees
...
of two nodes, excluding duplicates.
llvm-svn: 3848
2002-09-20 00:55:04 +00:00
Vikram S. Adve
e6ee32bfe2
Add PostOpts/ and rename PreSelection/ to PreOpts/.
...
llvm-svn: 3847
2002-09-20 00:53:53 +00:00
Vikram S. Adve
2f4d556d21
Add peephole optimization pass at the end of code generation.
...
llvm-svn: 3846
2002-09-20 00:52:43 +00:00
Vikram S. Adve
bbf45f6960
Added class MachineOptInfo as interface to target-specific
...
routines supporting machine code optimization.
Also added method MachineInstrInfo::getNOPOpCode().
llvm-svn: 3845
2002-09-20 00:52:09 +00:00
Vikram S. Adve
97c348d9ec
Add method MachineInstr::replace to rewrite a machine instruction in place.
...
llvm-svn: 3843
2002-09-20 00:47:49 +00:00
Vikram S. Adve
e008b2d62e
Allow copy coalescing in more cases: if sum of node degrees is more than
...
than #available regs, compute the sum excluding duplicates and if that
is less than #regs, go ahead and coalesce.
Add method IGNode::getCombinedDegree to count excluding duplicates.
llvm-svn: 3842
2002-09-20 00:45:47 +00:00
Vikram S. Adve
5e1c434572
Peephole optimization pass on final machine code.
...
llvm-svn: 3840
2002-09-20 00:42:11 +00:00
Vikram S. Adve
a50098d8e4
Files moved to CodeGen/PreOpts.
...
llvm-svn: 3839
2002-09-20 00:30:46 +00:00
Vikram S. Adve
e9ac29b475
Moving these files from Code/PreSelection to here.
...
Original logs for PreSelection.cpp:
revision 1.2
date: 2002/09/17 23:50:32; author: lattner; state: Exp; lines: +1 -3
Don't put default parameter values into .cpp files, it breaks 3.x compilers
revision 1.1
date: 2002/09/16 15:31:13; author: vadve; state: Exp;
New preselection pass that specializes LLVM code for a target machine,
while remaining in legal portable LLVM form and preserving type
information and type safety.
llvm-svn: 3838
2002-09-20 00:29:28 +00:00
Chris Lattner
1550ba2bc5
Add an optimization to support the most common access pattern for the
...
library. This speeds debug builds up significantly.
llvm-svn: 3826
2002-09-19 19:22:11 +00:00
Chris Lattner
a450397247
Make sure that we abort if an error happens as early as neccesary. Before
...
it was possible for the passmanager to continue running passes after the
verifier even if the module was not well formed.
llvm-svn: 3820
2002-09-19 16:12:19 +00:00
Anand Shukla
ea77a493ff
split retracing into a separate file
...
llvm-svn: 3809
2002-09-18 03:55:26 +00:00
Chris Lattner
18daee20f9
Compile sub-directories in parallel, because they don't have interdependencies
...
llvm-svn: 3808
2002-09-18 03:25:58 +00:00
Misha Brukman
ebcd1d7c16
Removed unnecessary #includes.
...
llvm-svn: 3802
2002-09-18 02:07:57 +00:00
Misha Brukman
892f59fcb2
Fixed typo.
...
llvm-svn: 3801
2002-09-18 00:42:45 +00:00
Chris Lattner
2d7730e3dd
Don't put default parameter values into .cpp files, it breaks 3.x compilers
...
llvm-svn: 3799
2002-09-17 23:50:32 +00:00
Chris Lattner
22cbac6511
There is a #define in some header that conflicts with INFINITY, rename it.
...
llvm-svn: 3797
2002-09-17 23:46:33 +00:00
Chris Lattner
a8339e3613
Fix bug: test/Regression/Transforms/InstCombine/2002-09-17-GetElementPtrCrash.ll
...
Thanks to Casey for finding it!
llvm-svn: 3783
2002-09-17 21:05:42 +00:00
Anand Shukla
ff0248c47c
Removed debug info printing
...
llvm-svn: 3778
2002-09-17 20:24:46 +00:00
Chris Lattner
077b45d931
Add support for GCC 2.96
...
llvm-svn: 3777
2002-09-17 17:23:09 +00:00
Vikram S. Adve
9d0fb1aac5
Don't print global variable definitions twice! Sun's pathetic compiler
...
never complained about this.
llvm-svn: 3774
2002-09-17 11:50:38 +00:00
Vikram S. Adve
0267d0c62e
Remove specification of argument default from cpp file.
...
llvm-svn: 3772
2002-09-17 01:17:57 +00:00
Chris Lattner
afb4fc189c
Fix FunctionInlining pass assertion failure:
...
ilist:104: failed assertion `Traits::getNext(NodePtr) != 0 && "Dereferencing end()!"'
llvm-svn: 3768
2002-09-16 22:30:20 +00:00
Chris Lattner
ec3936ac0d
Fix: test/Regression/LLC/badidx.c problem
...
llvm-svn: 3763
2002-09-16 18:32:33 +00:00
Vikram S. Adve
dba59921d7
Extract most of the transformation into an externally accessible
...
function -- DecomposeArrayRef(GetElementPtrInst* GEP) -- that can
be invoked on a single instruction at a time.
llvm-svn: 3755
2002-09-16 16:40:07 +00:00
Vikram S. Adve
b048d6633d
Use ulong instead of uint for size expressions.
...
llvm-svn: 3744
2002-09-16 15:56:45 +00:00
Vikram S. Adve
fff5ffde27
Add methods to query about the representation of LLVM quantities (e.g.,
...
constants). Useful for target-dependent LLVM transformations like
Preselection.
llvm-svn: 3743
2002-09-16 15:56:01 +00:00
Vikram S. Adve
8cbdbd8e2e
Don't print out global names unnecesssarily. Also, expose pass
...
constructors so passes can be inserted by TargetMachine.cpp.
llvm-svn: 3742
2002-09-16 15:54:02 +00:00
Vikram S. Adve
36d3e03fa0
Move all the code that creates code generation passes from Sparc.cpp to
...
TargetMachine.cpp, since it is entirely machine-independent.
Also, add options to disable optional back-end passes (preselection and
instr. scheduling).
llvm-svn: 3740
2002-09-16 15:39:26 +00:00
Vikram S. Adve
5ce9e4bc64
Add subdirectory PreSelection.
...
llvm-svn: 3739
2002-09-16 15:32:07 +00:00
Vikram S. Adve
161a507def
New preselection pass that specializes LLVM code for a target machine,
...
while remaining in legal portable LLVM form and preserving type
information and type safety.
llvm-svn: 3738
2002-09-16 15:31:13 +00:00
Vikram S. Adve
751130215f
Dump routine now writes out allocated register numbers if available.
...
llvm-svn: 3737
2002-09-16 15:18:53 +00:00
Vikram S. Adve
e567179aaa
Improve and fix error in allocating stack slots: adjust alignment after adding
...
base address of the relevant region (instead of assuming that each region
is maximally aligned).
llvm-svn: 3736
2002-09-16 15:18:16 +00:00
Vikram S. Adve
03710d247d
Add a version of ChooseRegOrImmed to handle numerical constants
...
introduced by InstrSelection.
llvm-svn: 3735
2002-09-16 15:15:57 +00:00
Vikram S. Adve
4d66e9973f
Add an assertion.
...
llvm-svn: 3734
2002-09-16 15:13:59 +00:00