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