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