Chris Lattner
a35d7412c6
Cloning stuff doesn't modify the source module
...
llvm-svn: 4787
2002-11-20 20:22:58 +00:00
Misha Brukman
45f6b8410e
MRegisterInfo.h - Added prototypes for functions we need to map a register to
...
an appropriate TargetRegisterClass, also adds TargetRegisterClass definition.
TargetMachine.h - speling.
llvm-svn: 4781
2002-11-20 18:54:53 +00:00
Chris Lattner
98cf1f5d64
- Eliminated the deferred symbol table stuff in Module & Function, it really
...
wasn't an optimization and it was causing lots of bugs.
llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
b251c3d727
Eliminate the concept of a deferred symbol table. The optimization really isn't,
...
and it causes obscure bugs to show up in passes.
llvm-svn: 4777
2002-11-20 18:07:48 +00:00
Misha Brukman
a5381b4932
SSARegMap -- the mapping between SSARegisters and their RegisterClasses, which
...
imply types of SSA Registers. This is on a per-function basis, so the
MachineFunction contains the SSARegMap, and has accessor functions to it.
llvm-svn: 4774
2002-11-20 00:53:10 +00:00
Chris Lattner
c362618f2a
Minor changes to cloning interface
...
llvm-svn: 4770
2002-11-19 22:54:01 +00:00
Chris Lattner
3aecfe8f61
Extend function cloning interface to support inlining
...
llvm-svn: 4767
2002-11-19 21:54:38 +00:00
Chris Lattner
891bbab848
This file is supersumed by Utils/Cloning.h
...
llvm-svn: 4765
2002-11-19 21:00:33 +00:00
Chris Lattner
36d074aac6
Merge cloning and inlining utilities
...
llvm-svn: 4763
2002-11-19 20:58:38 +00:00
Chris Lattner
9c1e935711
Move inlining pass to IPO.h
...
llvm-svn: 4761
2002-11-19 20:43:24 +00:00
Chris Lattner
58f9002b4a
Move the function extractor pass from tools/extract into lib/Xform/IPO
...
llvm-svn: 4759
2002-11-19 18:42:59 +00:00
Chris Lattner
b2e46c0714
Add a new Module::getNamedFunction method
...
llvm-svn: 4758
2002-11-19 18:41:44 +00:00
Chris Lattner
831f94c5a4
Ignore options that are ""
...
llvm-svn: 4757
2002-11-19 17:10:14 +00:00
Chris Lattner
a3ddb9b5ce
Add facility to compute peak memory usage
...
llvm-svn: 4752
2002-11-18 21:45:55 +00:00
Chris Lattner
2a254b6aa6
Inline DSTypeRec stuff into DSNode
...
llvm-svn: 4751
2002-11-18 21:45:30 +00:00
Chris Lattner
6d6b48b005
Inline DSTypeRec into DSNode
...
llvm-svn: 4750
2002-11-18 21:45:07 +00:00
Chris Lattner
11dbd0ff35
Templatize graph traits and iterator to work with const and non-const clients
...
llvm-svn: 4746
2002-11-18 21:42:19 +00:00
Chris Lattner
ee285c1df9
Add helper method
...
llvm-svn: 4744
2002-11-18 06:57:05 +00:00
Chris Lattner
d8ea18b695
Print is const!
...
llvm-svn: 4737
2002-11-17 23:22:13 +00:00
Chris Lattner
02fd454f07
Make sure that print gets a targetmachine
...
CVS: ----------------------------------------------------------------------
llvm-svn: 4735
2002-11-17 23:21:45 +00:00
Chris Lattner
7d413cdb2b
Omit the indirect node when printing call graphs
...
llvm-svn: 4733
2002-11-17 23:10:27 +00:00
Chris Lattner
4a22fb1fe9
Add machine independant printer interface
...
llvm-svn: 4729
2002-11-17 22:54:55 +00:00
Chris Lattner
be5ef9028b
Finish enumating code
...
llvm-svn: 4726
2002-11-17 22:33:54 +00:00
Chris Lattner
618c92908c
Remove unused methods
...
llvm-svn: 4720
2002-11-17 22:14:22 +00:00
Chris Lattner
76a95ecad0
Convert to use an enum to access def/use/use&def information. These make
...
reading code much easier than just seeing "true, false" especially when
default parameters default one but not both arguments.
llvm-svn: 4717
2002-11-17 21:56:10 +00:00
Chris Lattner
9fbccc672d
Return const refefrences to enable default construction
...
llvm-svn: 4713
2002-11-17 21:02:42 +00:00
Chris Lattner
fb1855921c
Fix warning
...
llvm-svn: 4708
2002-11-15 18:04:16 +00:00
Brian Gaeke
e74543584a
include/llvm/CodeGen/MachineInstrBuilder.h: Add addClobber() inline
...
convenience method. Fix typo in comment.
lib/Target/X86/InstSelectSimple.cpp: Explicitly specify some implicit uses.
Use MOVZX/MOVSX instead of MOV instructions with sign extend instructions.
Take out LEAVE instructions.
32-bit IDIV and DIV use CDQ, not CWQ (CWQ is a typo).
Fix typo in comment and remove some FIXME comments.
lib/Target/X86/Printer.cpp: Include X86InstrInfo.h and llvm/Function.h.
Add some simple code to Printer::runOnFunction to iterate over
MachineBasicBlocks and call X86InstrInfo::print().
lib/Target/X86/X86InstrInfo.def: Make some more instructions with
implicit defs "Void". Add more sign/zero extending "move" insns
(movsx, movzx).
lib/Target/X86/X86RegisterInfo.def: Add EFLAGS as a register.
llvm-svn: 4707
2002-11-14 22:32:30 +00:00
Chris Lattner
01f00ca60d
Remove dead method, add new method
...
llvm-svn: 4700
2002-11-12 15:57:28 +00:00
Chris Lattner
f8172fa67e
Almost complete rewrite of BU closure code
...
llvm-svn: 4693
2002-11-11 21:34:34 +00:00
Chris Lattner
7bb4144def
add method
...
llvm-svn: 4686
2002-11-10 23:47:02 +00:00
Chris Lattner
b16b332280
Add code to be able to merge two call sites
...
llvm-svn: 4685
2002-11-10 23:46:51 +00:00
Chris Lattner
c0a07a4631
Add tarj_end() method
...
llvm-svn: 4684
2002-11-10 23:46:31 +00:00
Chris Lattner
6fa433344d
Add hasGraph() methods to all of the passes for the printer
...
llvm-svn: 4676
2002-11-10 06:53:19 +00:00
Chris Lattner
f4850d6484
Implement swapping
...
llvm-svn: 4674
2002-11-10 06:48:24 +00:00
Chris Lattner
69494867d8
Implement support for swapping. Callsites now sort by callee
...
llvm-svn: 4673
2002-11-10 06:48:11 +00:00
Chris Lattner
4525e7899d
Add capability to set a preference of what call vector is printed to dot files
...
llvm-svn: 4672
2002-11-10 06:47:35 +00:00
Chris Lattner
628b23ab1d
Fix a problem where bad graphs could be generated
...
llvm-svn: 4671
2002-11-10 06:47:03 +00:00
Chris Lattner
715a3a3b5c
eliminate the ability to remove global nodes from deadNodeElminate... for now.
...
This slows stuff down a bit, but it should get much better before it gets any
worse.
llvm-svn: 4666
2002-11-09 22:07:02 +00:00
Chris Lattner
4b1be35569
Add globals graphs to all three passes
...
llvm-svn: 4663
2002-11-09 21:12:07 +00:00
Chris Lattner
ac64873403
Move maskNodeTypes from cpp file
...
llvm-svn: 4662
2002-11-09 21:02:30 +00:00
Chris Lattner
380d1ad4ab
Clean up DSGraph::removeDeadNodes interface
...
llvm-svn: 4660
2002-11-09 21:00:49 +00:00
Chris Lattner
71381c4f34
Make removeTriviallyDeadNodes a private interface
...
llvm-svn: 4658
2002-11-09 20:55:04 +00:00
Chris Lattner
e742f31e0c
Add initial support for a globals graph
...
llvm-svn: 4656
2002-11-09 20:01:01 +00:00
Chris Lattner
ba421d7fa4
Remove unneccesary #include
...
llvm-svn: 4653
2002-11-09 19:24:41 +00:00
Chris Lattner
352879d022
Remove GlobalDSGraph delcaration
...
llvm-svn: 4652
2002-11-09 19:21:56 +00:00
Chris Lattner
99cffdf379
Fix release build
...
llvm-svn: 4647
2002-11-09 00:48:52 +00:00
Chris Lattner
944dd0b1db
Add new methods
...
llvm-svn: 4646
2002-11-08 23:22:48 +00:00
Chris Lattner
27ad48cdc8
Add another option to cloneGraph
...
llvm-svn: 4641
2002-11-08 22:28:55 +00:00
Chris Lattner
79a6ab809d
- Add support for an "auxillary" call site list
...
- Original call sites are now never modified after construction by the local
pass.
- DSGraph::cloneInto can now optionally not clone the call sites
- BUDataStructures no longer has a ton of book-keeping info for a broken
implementation of the TD data structures
llvm-svn: 4631
2002-11-08 21:24:51 +00:00
Chris Lattner
1f985e0d3c
Add a method "getMainFunction()" that efficiently locates 'main' in a module
...
llvm-svn: 4629
2002-11-08 20:34:02 +00:00
Vikram S. Adve
1b72f8cd28
Include HashExtras.h since it is almost always needed anyway.
...
llvm-svn: 4626
2002-11-08 14:07:33 +00:00
Chris Lattner
05788d4b82
Use DSNodeHandle for persistent maps
...
llvm-svn: 4623
2002-11-08 05:03:37 +00:00
Chris Lattner
90d5c39415
Add flag that may be used to determine if dead nodes are used. It's temporary
...
llvm-svn: 4620
2002-11-08 01:22:26 +00:00
Vikram S. Adve
88d2821555
Restore a #include because this header file needs the definitions
...
of DSCallSite::~DSCallSite and DSNodeHandle::~DSNodeHandle.
llvm-svn: 4616
2002-11-08 00:23:23 +00:00
Chris Lattner
58f10cb88d
Add interfaces for ResolveCallSiteModRefInfo
...
llvm-svn: 4601
2002-11-07 07:11:49 +00:00
Chris Lattner
5e865cdbe2
Instead of using a bool that constant has to be explained, use a self
...
explanitory enum instead.
llvm-svn: 4600
2002-11-07 07:06:20 +00:00
Chris Lattner
8d493b51db
Add new method
...
llvm-svn: 4598
2002-11-07 06:30:17 +00:00
Chris Lattner
312afcafaf
Expose isPointerType to clients of dsanalysis
...
llvm-svn: 4597
2002-11-07 05:21:15 +00:00
Chris Lattner
7f6d8dd144
Add a comment
...
llvm-svn: 4586
2002-11-06 23:26:21 +00:00
Chris Lattner
bac5fec8b9
Allow the ResolveCallSiteModRefInfo method to return a mapping of nodes,
...
implement the mod/ref bit masking
llvm-svn: 4578
2002-11-06 19:59:33 +00:00
Chris Lattner
2b23bf16e3
Add a stub to implement the context sensitive mod/ref info for call sites
...
llvm-svn: 4577
2002-11-06 19:38:43 +00:00
Chris Lattner
3cf08cc08a
Give a back pointer to the IPModRef object to the FunctionModRefInfo object
...
llvm-svn: 4576
2002-11-06 19:07:13 +00:00
Chris Lattner
4167780062
Remove a couple of #includes, move some code to .cpp file
...
llvm-svn: 4574
2002-11-06 18:38:10 +00:00
Chris Lattner
21d8b9f0d6
Make maxSize a private variable, add a size() accessor
...
llvm-svn: 4573
2002-11-06 18:34:40 +00:00
Chris Lattner
468e98e64e
Make PointerShift/Size be enums so they are constants instead of globals
...
llvm-svn: 4571
2002-11-06 18:02:26 +00:00
Vikram S. Adve
075a8d7341
Make query operations non-const to allow demand-driven analyses.
...
llvm-svn: 4569
2002-11-06 17:17:55 +00:00
Vikram S. Adve
e781ba560e
An implementation of the bit-vector representation of sets.
...
llvm-svn: 4568
2002-11-06 17:14:14 +00:00
Vikram S. Adve
36da63f19f
An interprocedural analysis pass that computes flow-insensitive
...
IP Mod and Ref information for every function and every call site.
llvm-svn: 4567
2002-11-06 17:02:03 +00:00
Vikram S. Adve
85cbece4a3
Add const version of function getNodeForValue:
...
const DSNodeHandle &getNodeForValue(Value *V) const.
llvm-svn: 4566
2002-11-06 17:00:41 +00:00
Chris Lattner
48e37d9b97
Dramatically simplify internal DSNode representation, get implementation
...
*FULLY OPERATIONAL* and safe. We are now capable of completely analyzing
at LEAST the Olden benchmarks + 181.mcf
llvm-svn: 4562
2002-11-06 06:20:27 +00:00
Chris Lattner
4c74bd8936
Remove stripscalars argument to cloneInto
...
llvm-svn: 4561
2002-11-06 06:18:56 +00:00
Chris Lattner
4331647781
Add a bunch of assertions
...
llvm-svn: 4549
2002-11-04 23:59:41 +00:00
Chris Lattner
745b8516d2
Allow memory sizes to be negative, eliminate TmpRSS
...
llvm-svn: 4539
2002-11-04 19:20:09 +00:00
Vikram S. Adve
a9c3afbe4f
Generic graph iterator to enumerate the SCCs of a graph
...
in linear time using Tarjan's DFS algorithm.
llvm-svn: 4531
2002-11-04 14:15:57 +00:00
Chris Lattner
0ac3e3c039
Implement methods needed to print out call graph
...
llvm-svn: 4522
2002-11-04 02:53:39 +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
64b4ee3abc
Check in header file that was missing, thus broke the build
...
llvm-svn: 4513
2002-11-03 19:24:49 +00:00
Misha Brukman
5ab3a23f2e
Fixed comment on top of DSNode.h, added note to DSSupport.h as to why
...
functions were split out from DSNode class.
llvm-svn: 4509
2002-11-02 21:18:53 +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
a19a7bccc0
* Eliminate Scalar node type (renumber other node types)
...
* Allow DSNodeHandle::mergeWith to work if a node handle isn't pointing to a node yet
llvm-svn: 4487
2002-11-02 00:11:12 +00:00
Chris Lattner
5ef09c401b
Eliminate some unneccesary #includes and forward decls
...
llvm-svn: 4475
2002-10-31 21:24:10 +00:00
Misha Brukman
d88a3c3c93
Refactored DSGraph.h:
...
* DSGraph.h contains DSGraph
* DSNode.h contains DSNode (soon UDSNode and MDSNode)
* DSSupport.h contains DSCallsite, DSTypeRec, and DSNodeHandler
llvm-svn: 4466
2002-10-31 06:34:18 +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
cab6c33811
New isAssociative/isCommutative inspection methods, graciously contributed by
...
Casey Carter.
llvm-svn: 4459
2002-10-31 04:14:01 +00:00
Chris Lattner
b017a3ef50
Statistic class should return const reference to *this, not a reference to
...
the data type.
llvm-svn: 4458
2002-10-31 02:50:27 +00:00
Chris Lattner
869142e0d7
Add interface to update domfrontier info, thanks to Casey Carter for impl
...
llvm-svn: 4456
2002-10-31 02:39:48 +00:00
Vikram S. Adve
9a51899691
Bug fix: need to initialize new CallArgsDescriptor pointer.
...
llvm-svn: 4453
2002-10-30 20:38:49 +00:00
Vikram S. Adve
eaad439223
Bug fix in setting an implicit ref.
...
llvm-svn: 4452
2002-10-30 20:38:16 +00:00
Chris Lattner
5303b21635
Allow BuildMI that helps automate construction of SSA information
...
llvm-svn: 4443
2002-10-30 01:48:41 +00:00
Chris Lattner
0b8f3733f0
* Add new "Target Specific Flags" field to instruction descriptor
...
* Rename iclass to Flags
llvm-svn: 4439
2002-10-30 01:06:53 +00:00
Chris Lattner
75d3515824
Add new optional getRegisterInfo to TargetMachine
...
llvm-svn: 4436
2002-10-30 00:53:02 +00:00
Chris Lattner
528781d9ff
Add support for structured printing
...
llvm-svn: 4432
2002-10-30 00:46:48 +00:00
Chris Lattner
b7e661059b
Improve comments, add methods for structured printing
...
llvm-svn: 4431
2002-10-30 00:46:31 +00:00
Chris Lattner
61fa909cc9
Add method
...
llvm-svn: 4428
2002-10-29 23:40:30 +00:00
Chris Lattner
4623709bb7
Add capability to have machine instruction autoinsert when it is created
...
llvm-svn: 4424
2002-10-29 23:18:23 +00:00
Misha Brukman
b1e1d35012
Fixed spelling of `propagation'.
...
llvm-svn: 4422
2002-10-29 22:55:11 +00:00
Chris Lattner
d9c45e1310
Eliminate virtual methods that are sparc specific
...
llvm-svn: 4419
2002-10-29 22:01:26 +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
5667f0eefd
Allow TargetMachine to refuse static code gen
...
llvm-svn: 4415
2002-10-29 21:12:46 +00:00
Chris Lattner
548cd8e37f
Rename Sparc.h to TargetMachineImpls.h. Add hook for X86 target
...
llvm-svn: 4412
2002-10-29 20:51:29 +00:00
Chris Lattner
b7fbdb1bef
Add hook for JIT compiler
...
llvm-svn: 4411
2002-10-29 20:51:10 +00:00
Chris Lattner
c87281c349
Move to TargetMachineImpls.h
...
llvm-svn: 4405
2002-10-29 20:44:18 +00:00
Chris Lattner
f4e4ed7612
Merge with sparc backend
...
llvm-svn: 4403
2002-10-29 20:10:58 +00:00
Chris Lattner
ca8fbb9cde
Merge to MachineInstrInfo.h
...
llvm-svn: 4402
2002-10-29 20:10:19 +00:00
Chris Lattner
b7d29c224c
X86 merge complete, eliminate dead code
...
llvm-svn: 4401
2002-10-29 20:07:50 +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
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
353b60a872
Rename opCodeString to Name, add new getName() method
...
llvm-svn: 4388
2002-10-29 17:35:09 +00:00
Chris Lattner
b09c202cbc
Rename MachineInstrInfo::getDescriptor to MachineInstrInfo::get
...
llvm-svn: 4387
2002-10-29 17:26:26 +00:00
Chris Lattner
cc4df76576
Remove old entrypoint
...
llvm-svn: 4385
2002-10-29 17:15:01 +00:00
Chris Lattner
94f3fae994
Remove unneeded #include
...
llvm-svn: 4384
2002-10-29 17:14:10 +00:00
Chris Lattner
189c099a7f
De-inline methods
...
llvm-svn: 4379
2002-10-29 16:50:33 +00:00
Chris Lattner
e9bda57b87
Remove unneeded #include
...
llvm-svn: 4377
2002-10-29 16:50:06 +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
d659ab3e66
Remove unneccesary #include
...
llvm-svn: 4374
2002-10-29 16:34:12 +00:00
Chris Lattner
247f3ee02d
Delete unused header file
...
llvm-svn: 4373
2002-10-29 16:32:08 +00:00
Chris Lattner
64e0e8e0f8
MachineInstrInfo doesn't need a TargetMachine member
...
llvm-svn: 4371
2002-10-29 15:44:40 +00:00
Chris Lattner
a44e68e532
Minor cleanups, remove noncopyable so dot doesn't cluster unrelated stuff
...
llvm-svn: 4365
2002-10-28 23:54:23 +00:00
Chris Lattner
efef410839
Strip a bunch of #includes from the file, move some virtual functions to
...
.cpp file
llvm-svn: 4364
2002-10-28 23:53:56 +00:00
Chris Lattner
ab9a2a93a2
Inline some code from the cpp file
...
llvm-svn: 4363
2002-10-28 23:53:32 +00:00
Chris Lattner
1c6e20aab6
Minor comment updates
...
llvm-svn: 4361
2002-10-28 21:43:42 +00:00
Chris Lattner
7af0432c10
Initial checkin of MachineInstrBuilder class
...
llvm-svn: 4360
2002-10-28 21:31:48 +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
Misha Brukman
0a304ce248
Iterator functions now line up together.
...
llvm-svn: 4350
2002-10-28 19:58:38 +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
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
14926845fb
* s/unsigned int/unsigned
...
* Make MachineInstrDescriptor only keep a const char * instead of a string
for the opcode name.
llvm-svn: 4335
2002-10-28 04:55:56 +00:00
Chris Lattner
dddf22c118
Make scheduling class variables be 'unsigned' instead of 'int'
...
llvm-svn: 4334
2002-10-28 04:53:18 +00:00
Chris Lattner
b3dbd494eb
Remove typedef that is unneccesary
...
llvm-svn: 4332
2002-10-28 04:50:01 +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
411837979a
Add new getOperandType(i) method to MachineInstr
...
llvm-svn: 4330
2002-10-28 04:30:20 +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
bb49babe18
Make MachineInstr.h not #include MachineInstrInfo.h
...
llvm-svn: 4328
2002-10-28 02:29:46 +00:00
Chris Lattner
6fc6ab41fe
Remvoe a bunch of unneeded forward decls
...
llvm-svn: 4326
2002-10-28 02:27:07 +00:00
Chris Lattner
94a4f22573
Don't #include <Support/*>, #include "Support/*"
...
llvm-svn: 4325
2002-10-28 02:11:53 +00:00
Chris Lattner
defd415d01
Add BasicBlock list to MchineFunction that will eventually be the only
...
way to access MachineBasicBlocks. For now, it is never filled.
llvm-svn: 4324
2002-10-28 02:08:43 +00:00
Chris Lattner
fdbcbf57bb
MachineFunction.h now includes MachineBasicBlock.h in preparation for
...
list changes.
llvm-svn: 4321
2002-10-28 02:01:06 +00:00
Chris Lattner
07c9059e72
Remvoe dead fixme and typedef
...
llvm-svn: 4320
2002-10-28 01:55:26 +00:00
Chris Lattner
1861eced0e
MachineBasicBlock doesn't need basicblock.h, it needs Annotation.h
...
llvm-svn: 4319
2002-10-28 01:53:00 +00:00
Chris Lattner
f6e3651498
Rename file to MachineBasicBlock.h
...
llvm-svn: 4316
2002-10-28 01:39:21 +00:00
Chris Lattner
a94922983f
Add note about state that should be removed when time permits
...
llvm-svn: 4315
2002-10-28 01:27:51 +00:00
Chris Lattner
3ade8929ef
Fixes to previous checkin
...
llvm-svn: 4314
2002-10-28 01:27:30 +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
f200a3e251
Add prototypes for creation/destruction passes
...
llvm-svn: 4309
2002-10-28 01:11:58 +00:00
Chris Lattner
5827eeeb66
* Doxygenify comments
...
* Move addPassesToEmitAssembly back to Sparc.cpp because it really is
sparc specific
llvm-svn: 4306
2002-10-28 01:02:24 +00:00
Chris Lattner
eae4d0a9e7
This header is renamed to MachineFunction.h
...
llvm-svn: 4304
2002-10-28 00:45:06 +00:00
Chris Lattner
3b652a3968
We don't need the forwarding typedef
...
llvm-svn: 4303
2002-10-28 00:44:09 +00:00
Misha Brukman
7ae7f84cf3
Changed `MachineCodeForMethod' to `MachineFunction'.
...
llvm-svn: 4301
2002-10-28 00:28:31 +00:00
Chris Lattner
3baffd73a9
Add support or other operand types
...
llvm-svn: 4298
2002-10-27 21:17:45 +00:00
Chris Lattner
32a044b650
Prune #includes
...
llvm-svn: 4295
2002-10-27 20:49:47 +00:00
Chris Lattner
b1f02f7f02
Add neccesary #include
...
llvm-svn: 4294
2002-10-27 19:16:27 +00:00
Chris Lattner
d5112d71f3
Old GCC's don't have an <ostream>
...
llvm-svn: 4293
2002-10-27 19:12:37 +00:00
Chris Lattner
c98c871617
Add #include
...
llvm-svn: 4291
2002-10-27 19:08:03 +00:00
Chris Lattner
348fcb5b17
Initial checkin of target support for X86 backend.
...
llvm-svn: 4287
2002-10-25 23:00:40 +00:00
Chris Lattner
aed689d1aa
Initial checkin of Machine Code representation for X86 backend. This will
...
eventually be merged with the sparc backend.
llvm-svn: 4286
2002-10-25 23:00:13 +00:00
Chris Lattner
75758af085
Fix typo
...
llvm-svn: 4281
2002-10-25 22:53:56 +00:00
Chris Lattner
48164f4398
* Remove unneccesary #includes
...
* Fix typeo in the (unused) MachineInstrInfo::isArith method
llvm-svn: 4275
2002-10-24 22:34:41 +00:00
Chris Lattner
45bb78fc06
Minor cleanups
...
llvm-svn: 4267
2002-10-23 01:11:51 +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
96c998fb19
We need to know the call sites each function hosts
...
llvm-svn: 4258
2002-10-22 15:58:23 +00:00
Chris Lattner
ef09736481
Allow modification of callee
...
llvm-svn: 4257
2002-10-22 15:57:58 +00:00
Chris Lattner
e50beac7ea
Small space optimization: Make MachineOperands take 16 bytes instead of
...
20 on intel or 24 on sparc
llvm-svn: 4256
2002-10-22 00:15:13 +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
c5cb7a7dc0
Make sure to initialize isArray member
...
llvm-svn: 4247
2002-10-21 13:38:07 +00:00
Chris Lattner
295d3ed7b8
Remove a 'using' directives from a header file. Using directives cause
...
global changes, so aren't good for headers.
llvm-svn: 4245
2002-10-21 13:24:50 +00:00
Chris Lattner
e4b24cc42c
Add a missing std:: qualifier
...
llvm-svn: 4244
2002-10-21 13:23:42 +00:00
Chris Lattner
a986a2ab86
Two callsites are equivalent even if they are from two completely different
...
call instructions
llvm-svn: 4241
2002-10-21 02:09:03 +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
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
2ff405c7e1
Add isArray flag
...
llvm-svn: 4230
2002-10-20 20:28:35 +00:00
Vikram S. Adve
ee5fb32466
Added a first-class representation for each call site that can be
...
used in the DS graphs in DSGraph.h. With that, the special-purpose
class BUDataStructure::CallSite is no longer needed here.
llvm-svn: 4229
2002-10-20 18:08:55 +00:00
Vikram S. Adve
2b68f2fbbc
Added a first-class representation for each call site that can be used
...
in the DS graphs.
llvm-svn: 4227
2002-10-20 18:04:43 +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
e7c0293f1f
Don't emit braces around something without outgoing edges
...
llvm-svn: 4225
2002-10-18 14:55:44 +00:00
Chris Lattner
3d1fddea22
Add interface for mod/ref info to be captures by dsgraphs
...
llvm-svn: 4222
2002-10-17 21:03:49 +00:00
Chris Lattner
6bbd3ba458
* Add data structures to BU pass to keep track of call sites for functions
...
* Reenable the TD analysis
llvm-svn: 4212
2002-10-17 04:23:05 +00:00
Chris Lattner
d1b221c011
* Remove a lot of obsolete #if 0'd code
...
* Add a simple getNodeForValue method to access the ValueMap.
llvm-svn: 4211
2002-10-17 04:22:16 +00:00
Chris Lattner
5b1f684994
Use the forward declaration for GraphTraits instead of #including
...
the header
llvm-svn: 4210
2002-10-17 01:36:08 +00:00
Chris Lattner
5c7d1d2630
Be const correct. Handle both DSGraph* and const DSGraph*'s
...
llvm-svn: 4208
2002-10-17 01:01:06 +00:00
Chris Lattner
aac0864f11
Break up the GraphWriter into smaller chunks to be used in different ways
...
llvm-svn: 4207
2002-10-17 00:59:59 +00:00
Chris Lattner
d2122e26ce
As wierd as it feels to type it, const void* is more generic than void*
...
llvm-svn: 4206
2002-10-17 00:16:39 +00:00
Joel Stanley
f06e4acd32
Added partial specialization of GraphTraits for the DominatorTree class.
...
llvm-svn: 4205
2002-10-16 23:26:00 +00:00
Chris Lattner
6d44463ac2
Allow simple nodes to have outgoing edges
...
llvm-svn: 4202
2002-10-16 20:15:38 +00:00
Chris Lattner
b2694db06e
* Factor printing code again, add emitSimpleNode method
...
llvm-svn: 4198
2002-10-16 02:03:18 +00:00
Chris Lattner
adfe59294d
* Add new DOTGraphTraits::addCustomGraphFeatures method
...
llvm-svn: 4197
2002-10-16 01:44:59 +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
e515976a11
* Significantly refactor GraphWriter into a class.
...
llvm-svn: 4194
2002-10-16 01:34:18 +00:00
Chris Lattner
cf5eb3317a
- Generic graph printing infrastructure changes:
...
* Only print outgoing edges from a cell if the destination isn't null.
This is important for DSGraphs, which have sources with no edges.
* Allow Node attributes to override shape of the node
llvm-svn: 4192
2002-10-16 01:18:14 +00:00
Chris Lattner
edd30e5bfa
Allow direct access to mergemap for printing
...
llvm-svn: 4191
2002-10-16 01:17:16 +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
5156bba4c7
- Add an endianness field to the TargetData datastructure
...
llvm-svn: 4174
2002-10-14 22:41:13 +00:00
Vikram S. Adve
4049a9a5de
Removed misleading const keyword.
...
llvm-svn: 4169
2002-10-14 16:32:24 +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
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
894962baaf
First crack at reimplementing graph traits for DSGraphs
...
llvm-svn: 4145
2002-10-13 19:31:34 +00:00
Chris Lattner
10bdae7c9e
disable the unused "pointer" member
...
llvm-svn: 4144
2002-10-13 19:30:44 +00:00
Chris Lattner
0e0e32dea9
Add dummy entries to document what members can be added
...
llvm-svn: 4141
2002-10-13 17:12:05 +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
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
d484dd8da4
Expose API to graph library to allow iteration over all nodes, even unreachable ones
...
llvm-svn: 4111
2002-10-10 22:31:31 +00:00
Chris Lattner
27abebe1b6
Change reference
...
llvm-svn: 4110
2002-10-10 22:31:02 +00:00
Chris Lattner
e3336c72c0
* Don't only print out reachable nodes in the graph.
...
* use new api to get all nodes in the graph
* Allow custom graph traits
llvm-svn: 4109
2002-10-10 22:29:51 +00:00
Chris Lattner
f43f410dfb
Add new getGraphProperties that may be specialized by graphs
...
llvm-svn: 4108
2002-10-10 22:29:10 +00:00
Chris Lattner
513401821c
Rename DataStructureGraph.h to DSGraphTraits.h
...
llvm-svn: 4107
2002-10-10 20:36:37 +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
083a1f7890
Make isExtern() be a virtual function inherited from GlobalValue
...
llvm-svn: 4101
2002-10-09 23:11:33 +00:00
Chris Lattner
3d6c35b92e
- Detemplatize UseTy<> in Value.h, because it's only instantiated for one
...
type!
llvm-svn: 4093
2002-10-09 00:42:03 +00:00
Chris Lattner
5cb6394287
- Remove Value::use_push_back & Value::use_remove
...
llvm-svn: 4089
2002-10-09 00:25:01 +00:00
Chris Lattner
ed5fabe19b
By default PHINode::removeIncomingValue will delete the phi node if the last
...
incoming value is deleted!
llvm-svn: 4076
2002-10-08 21:31:56 +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
433604a5f5
Don't rotate paper.
...
llvm-svn: 4066
2002-10-07 22:37:03 +00:00
Chris Lattner
1484662c07
- Allow printing generic LLVM graphs to 'dot' files, so they can be
...
visualized easily.
llvm-svn: 4061
2002-10-07 18:37:10 +00:00
Chris Lattner
31ae011e43
Fix bug in last checkin
...
llvm-svn: 4058
2002-10-07 17:13:22 +00:00
Chris Lattner
6fa8a99101
Implement operator= for SuccIterators
...
llvm-svn: 4055
2002-10-07 16:53:22 +00:00
Chris Lattner
9e31c7ea8a
- Add new isExternal() method to GlobalVariable to mirror Function.
...
- doxygenize comments and add new comments
llvm-svn: 4046
2002-10-06 22:29:58 +00:00
Chris Lattner
9a389b3cce
The wall clock timer (implementing using the RTC or cycle counter on x86) is
...
so much more accurate than the per process timers that we get better results
(less noise) by sorting according to wall time than process time.
llvm-svn: 4034
2002-10-03 21:08:20 +00:00
Chris Lattner
7a525a94db
Remove commented out stuff
...
DataStructure.h doesn't include DSGraph.h now
llvm-svn: 4028
2002-10-02 22:14:17 +00:00
Chris Lattner
10725d5341
Move GlobalDSGraph class defn to the end of the file
...
llvm-svn: 4027
2002-10-02 21:55:52 +00:00
Chris Lattner
9beee8590a
This file doesn't need Pass.h
...
llvm-svn: 4026
2002-10-02 21:55:24 +00:00
Chris Lattner
be9f70e342
* Implement fully general merging of array subscripts on demand! This
...
does not handle the initial pointer index case yet though.
llvm-svn: 4011
2002-10-02 06:24:29 +00:00
Chris Lattner
c2222c8077
Checkin the "meat" of the Data structure graph itself. I forgot to check
...
this in before. :(
llvm-svn: 4009
2002-10-02 04:58:12 +00:00
Chris Lattner
06f9532c8a
- Remove the User::eraseOperand method which is never used, really
...
dangerous, and not something we want to expose.
llvm-svn: 4007
2002-10-01 23:41:17 +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
7c91242aef
Check in DataStructure rewrite so far.
...
llvm-svn: 3998
2002-10-01 22:34:45 +00:00
Chris Lattner
6dad11f6c0
Checkin generic interval timer support
...
llvm-svn: 3992
2002-10-01 19:36:54 +00:00
Vikram S. Adve
6be99c4f23
Added several more helper functions for construction MachineInstrs.
...
llvm-svn: 3983
2002-09-29 22:55:45 +00:00
Vikram S. Adve
5b5dd671b2
Minor change to interface for Create{Zero,Sign}ExtensionsInstructions.
...
llvm-svn: 3979
2002-09-29 21:53:31 +00:00
Chris Lattner
85dd58c2cb
Simplify code a bit, add an assertion
...
llvm-svn: 3974
2002-09-29 21:37:08 +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
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
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
9b4c1aa389
Checkin new loop-preheader insertion pass.
...
llvm-svn: 3943
2002-09-26 16:17:33 +00:00
Chris Lattner
0fcb61f2b7
- Fix bug in LoopInfo causing ParentLoop to be garbage
...
llvm-svn: 3940
2002-09-26 16:15:19 +00:00
Chris Lattner
6561db0c12
- Add methods to ImmediateDominators & DominatorTree to allow updates
...
- Make DominatorTree::Node not inherit from std::vector
llvm-svn: 3938
2002-09-26 16:14:37 +00:00
Chris Lattner
9ff37c5265
Add a new "DominatorSet::addDominator" method to allow updates
...
llvm-svn: 3937
2002-09-26 05:42:47 +00:00
Chris Lattner
0a96a521eb
- Add new methods to LoopInfo: getLoopPreheader, addBasicBlockToLoop.
...
These allow extra information to be easily gathered, and loopinfo to be
updated.
llvm-svn: 3935
2002-09-26 05:32:43 +00:00
Chris Lattner
506389a37f
- Add new ctor to BasicBlock to allow insertion before any BB, not just at
...
the end of the function.
llvm-svn: 3933
2002-09-26 05:03:17 +00:00
Chris Lattner
7b5746bfcf
Converted SimpleStructMutation to take TargetData as a required pass.
...
llvm-svn: 3931
2002-09-26 00:17:18 +00:00
Chris Lattner
79efacbb19
Change LowerAllocations pass to 'require' TargetData instead of it being
...
passed in.
llvm-svn: 3930
2002-09-25 23:47:49 +00:00
Chris Lattner
fec6850f90
Convert TargetData to be an ImmutablePass
...
llvm-svn: 3928
2002-09-25 23:46:56 +00:00
Chris Lattner
635d8919a7
ImmutablePass's don't need a runOnFunction, nor do they need to explicitly say
...
that they preserve all xforms
llvm-svn: 3925
2002-09-25 22:27:54 +00:00
Chris Lattner
81f4eaab04
Convert BasicAA to be an immutable pass instead of a FunctionPass
...
llvm-svn: 3922
2002-09-25 22:00:18 +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
Chris Lattner
7a6ce5a28c
Checkin stub for Misha to implement
...
llvm-svn: 3919
2002-09-25 19:10:06 +00:00
Chris Lattner
068c681a84
- Do not expose Critical Edge breaking mechanics outside the BCE pass, thus
...
removing it from Transforms/Local.h and from Transforms/Utils/*
llvm-svn: 3909
2002-09-24 15:51:54 +00:00
Chris Lattner
13fea86b05
Expose passinfo from BreakCriticalEdges pass so that it may be "Required" by
...
other passes
llvm-svn: 3906
2002-09-24 15:42:27 +00:00
Chris Lattner
9f48a00e43
Add new BreakCriticalEdges pass
...
llvm-svn: 3902
2002-09-24 00:08:37 +00:00
Chris Lattner
34d39668f9
There are no implicit gep forms of load and store anymore
...
llvm-svn: 3901
2002-09-24 00:08:01 +00:00
Chris Lattner
fc75a8552d
Make users of FindUsedTypes not have problems with linkage. This fixes
...
cwriter.
llvm-svn: 3899
2002-09-24 00:07:17 +00:00
Chris Lattner
6b9be6f95a
Group #includes better
...
llvm-svn: 3887
2002-09-23 17:45:52 +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
Vikram S. Adve
0a79c117ac
Peephole optimization pass on final machine code.
...
llvm-svn: 3863
2002-09-20 16:33:03 +00:00
Vikram S. Adve
c4869837dd
Add erase() method for a single element.
...
llvm-svn: 3849
2002-09-20 00:55:57 +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
302435b841
Interface to target-specific routines that support machine code optimization.
...
llvm-svn: 3844
2002-09-20 00:49:21 +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
Chris Lattner
67b9d7f7a9
Workaround for bug in GCC 3.1.1 iostreams library on sparc. It apprarently
...
isn't flushing an ostream when it is deleted.
llvm-svn: 3834
2002-09-19 20:49:25 +00:00
Chris Lattner
3eeba80732
Fix ambiguity problem due to builtin log2(double) function
...
llvm-svn: 3800
2002-09-17 23:56:50 +00:00
Chris Lattner
5d15ed99a3
Fix namespace correctness bug
...
llvm-svn: 3798
2002-09-17 23:48:02 +00:00
Chris Lattner
011abb4a32
Add support for gcc 3.2
...
llvm-svn: 3795
2002-09-17 23:38:38 +00:00
Chris Lattner
95094782a1
Remove extra #include
...
llvm-svn: 3776
2002-09-17 17:18:12 +00:00
Vikram S. Adve
a43a66fdc4
Fix typo in comment.
...
llvm-svn: 3773
2002-09-17 11:09:59 +00:00
Chris Lattner
8597d0e453
Fix compile problem on linux. Noone should ever #include <inttypes.h>
...
directly. Instead, include Support/DataTypes.h
llvm-svn: 3766
2002-09-16 20:44:19 +00:00
Vikram S. Adve
de72fca8a1
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: 3759
2002-09-16 18:08:17 +00:00
Vikram S. Adve
9d48fcaf1b
Add ilist_iterator constructor from a node reference.
...
llvm-svn: 3756
2002-09-16 16:46:17 +00:00
Vikram S. Adve
e3a75d6b33
Allow transformation DecomposeArrayRef(GetElementPtrInst* GEP) to
...
be invoked on a single instruction at a time, for use in other passes.
llvm-svn: 3751
2002-09-16 16:07:19 +00:00
Vikram S. Adve
5c363ba209
Add routines to update or erase operands (and to do so without external
...
assumptions about which operand number stores what operand).
llvm-svn: 3750
2002-09-16 16:06:12 +00:00
Vikram S. Adve
4b775b2763
*** empty log message ***
...
llvm-svn: 3749
2002-09-16 16:01:41 +00:00
Vikram S. Adve
df7d0b5a9e
Add support for passes that use a TargetMachine object.
...
llvm-svn: 3748
2002-09-16 16:01:39 +00:00
Vikram S. Adve
794cbb1e11
Add method MachineOperand::hasAllocatedReg().
...
llvm-svn: 3747
2002-09-16 15:58:54 +00:00
Vikram S. Adve
656e77d102
Add a version of ChooseRegOrImmed to handle numerical constants
...
introduced by InstrSelection.
llvm-svn: 3746
2002-09-16 15:58:34 +00:00
Vikram S. Adve
2d2fb24342
Add method adjustAlignment so that stack slot alignments can be computed
...
in a target-dependent manner (because of the dang OFFSET in Sparc v9).
llvm-svn: 3745
2002-09-16 15:57:43 +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
4f5bad8d2e
*** empty log message ***
...
llvm-svn: 3741
2002-09-16 15:39:35 +00:00
Vikram S. Adve
d171a8c7c5
Remove unnecessary include.
...
llvm-svn: 3723
2002-09-14 23:04:52 +00:00
Vikram S. Adve
c9f1e71360
Break RA_DEBUG option into several levels to get better output.
...
llvm-svn: 3722
2002-09-14 22:18:37 +00:00
Chris Lattner
a4583fdafc
Fix to work correctly under linux
...
llvm-svn: 3720
2002-09-14 19:52:49 +00:00
Vikram S. Adve
a8f926c0c1
Moving to lib/CodeGen/RegAlloc.
...
llvm-svn: 3718
2002-09-14 11:57:17 +00:00
Vikram S. Adve
40a24e841e
Add support for MacOS and (hopefully) other BSD derivatives.
...
llvm-svn: 3717
2002-09-14 10:42:59 +00:00
Chris Lattner
fc91ee91e8
Change the MallocInst & AllocaInst ctors to take the allocated type, not the
...
pointer type returned.
llvm-svn: 3711
2002-09-13 22:28:50 +00:00
Chris Lattner
240f026d9a
Tighten up sanity checking
...
llvm-svn: 3706
2002-09-13 22:18:26 +00:00
Chris Lattner
8c63fee2d9
Try to work well on multiple platforms.
...
llvm-svn: 3704
2002-09-13 21:51:25 +00:00
Chris Lattner
e614665c1c
Add better linux support by using the right macro. This still should be
...
autoconfiscated, but for now this is sufficient.
llvm-svn: 3701
2002-09-13 15:37:58 +00:00
Chris Lattner
5d40b83adf
Checkin patch written by Casey Carter, enabling support for the redhat GCC 2.96
...
compiler.
llvm-svn: 3697
2002-09-13 14:33:39 +00:00
Chris Lattner
5e08e70f6c
Add a new BasicBlockPass::doInitialization/Finalization(Function &) pair of
...
methods that may be useful for BasicBlockPasses.
llvm-svn: 3689
2002-09-12 17:06:43 +00:00
Chris Lattner
813d4aa6c0
Convert index type for getelementptr instruction from uint to long
...
llvm-svn: 3678
2002-09-11 01:16:19 +00:00
Chris Lattner
4ecbe74c27
Add convenience ctor to BranchInst
...
llvm-svn: 3675
2002-09-10 23:54:56 +00:00
Chris Lattner
5bf620748f
Implement support for inserting an instruction into a basic block right when it
...
is created.
llvm-svn: 3651
2002-09-10 15:36:11 +00:00
Chris Lattner
9ae0fd2d6c
Eliminate the GenericBinaryInst class
...
llvm-svn: 3649
2002-09-10 15:35:23 +00:00
Chris Lattner
7d02d3102a
* Eliminate GenericBinaryInst class
...
* Allow specifying where to insert a newly created SetCondInst
llvm-svn: 3648
2002-09-10 15:34:41 +00:00
Chris Lattner
9c11ca3b17
Eliminate the GenericBinaryInst class.
...
llvm-svn: 3647
2002-09-10 15:27:31 +00:00
Chris Lattner
45719ee85d
Eliminate setType method
...
Now the only way to set the type of a value is in the ctor for an object
llvm-svn: 3646
2002-09-10 15:26:27 +00:00
Chris Lattner
d85566e59a
Move TmpInstruction ctor to InstrSelection.cpp file
...
llvm-svn: 3622
2002-09-08 21:07:51 +00:00
Chris Lattner
57c6a2123d
Checkin initial support for automatic memory leak detection routines
...
llvm-svn: 3617
2002-09-08 18:51:12 +00:00
Chris Lattner
809375647d
* Clean up some comments
...
* Move code out of header file to .cpp files, to make future changes easier
* Add arguments to classes so that they can be automatically inserted into their
parent structure upon creation.
llvm-svn: 3604
2002-09-06 21:31:57 +00:00
Chris Lattner
43a240e346
* Clean up indentation a bit
...
* Fix broken comments (copy and pasto)
* Remove irrelevant comment
* Add extra argument to function that causes it to get inserted into a module
automatically.
llvm-svn: 3601
2002-09-06 20:47:31 +00:00
Chris Lattner
1ff9162127
Include stub for correlated expression elimination pass
...
llvm-svn: 3597
2002-09-06 18:39:29 +00:00
Chris Lattner
00b95cc534
- Rename BreakCriticalEdge to the slightly more standard SplitCriticalEdge
...
llvm-svn: 3587
2002-09-06 02:35:11 +00:00
Chris Lattner
579bb9b527
* Doxygenize API
...
* Add new functions for identifying and breaking critical edges
llvm-svn: 3586
2002-09-06 02:19:25 +00:00
Chris Lattner
3684289913
- Doxygenize comments
...
- Add new method to dominatorset: properlyDominates
- Add synonmys for operator[] to classes so that pointers to dominator
information can be used more easily.
- Add API's to update dominator information
llvm-svn: 3585
2002-09-06 02:16:27 +00:00
Chris Lattner
c0396b8b9e
Make getAnalysisToUpdate<AnalysisType>() public so that transformation APIs
...
can update analysis information.
llvm-svn: 3584
2002-09-06 02:14:47 +00:00
Vikram S. Adve
e6834a1ce5
Add new function MachineInstrInfo::CreateZeroExtensionInstructions.
...
llvm-svn: 3582
2002-09-05 18:36:41 +00:00
Chris Lattner
2d42bbf5d0
- Renamed Type::isIntegral() to Type::isInteger()
...
- Added new method Type::isIntegral() that is the same as isInteger, but
also accepts bool.
SCVS: ----------------------------------------------------------------------
llvm-svn: 3572
2002-09-03 01:05:48 +00:00
Chris Lattner
7a558ad672
Implement operator== and != for ranges
...
llvm-svn: 3571
2002-09-03 01:05:31 +00:00
Chris Lattner
b986628323
Remove duplicate #include
...
llvm-svn: 3567
2002-09-02 04:04:11 +00:00
Chris Lattner
4293908573
Add printing support to ConstantRange class
...
llvm-svn: 3566
2002-09-02 00:18:26 +00:00
Chris Lattner
a17c18ce28
Initial implementation of ConstantRange support
...
llvm-svn: 3564
2002-09-01 23:53:39 +00:00
Chris Lattner
a48992faaa
- Exposed SetCondInst::getInverseCondition & ::getSwappedCondition better
...
- Doxygenized iOperators.h
llvm-svn: 3561
2002-09-01 19:46:36 +00:00
Chris Lattner
bc56c86ca4
Convert cwriter to be a pass.
...
llvm-svn: 3557
2002-08-31 00:28:25 +00:00
Chris Lattner
ed39ccae8d
- Eliminate the last traces of the 'analysis' namespace
...
llvm-svn: 3550
2002-08-30 22:53:53 +00:00
Chris Lattner
91f9b9de9e
Update comments
...
llvm-svn: 3547
2002-08-30 22:51:21 +00:00
Chris Lattner
f7e2daf5a4
Fix comments.
...
llvm-svn: 3546
2002-08-30 22:51:08 +00:00
Chris Lattner
ba6fda3e69
Merged into ValueNumbering.cpp
...
llvm-svn: 3545
2002-08-30 22:30:51 +00:00
Chris Lattner
a70e697e29
Initial implementation of basic value numbering
...
This file will probably go away at some point
llvm-svn: 3542
2002-08-30 20:30:03 +00:00
Chris Lattner
3e4e6974f2
Initial version of LoadValueNumbering interface
...
llvm-svn: 3539
2002-08-30 20:27:48 +00:00
Chris Lattner
0653f10c2f
Initial version of ValueNumbering interface
...
llvm-svn: 3538
2002-08-30 20:27:15 +00:00
Chris Lattner
91046f158e
- PassInfo class keeps track of AnalysisGroups implemented by the Pass.
...
- Doxygenize comments
llvm-svn: 3532
2002-08-30 20:20:39 +00:00
Chris Lattner
aefad603ad
- Pass now has AnalysisImpls class to implement getAnalysis() so that it is
...
correct even when called back by another passes run method.
llvm-svn: 3531
2002-08-30 20:19:49 +00:00
Chris Lattner
bcc8a72b52
Fix comments
...
llvm-svn: 3523
2002-08-29 20:08:39 +00:00
Chris Lattner
b3b49799b8
Make the getAnalyss<> members const. Using them does NOT modify the Pass object.
...
llvm-svn: 3522
2002-08-29 20:07:59 +00:00
Chris Lattner
81fabb05e5
Add support for turning an array of characters into a string.
...
llvm-svn: 3509
2002-08-26 17:53:56 +00:00
Anand Shukla
e87291ef83
Changed so it gets linked properly
...
llvm-svn: 3508
2002-08-26 16:45:19 +00:00
Chris Lattner
b3a296fc6a
Convert comments to Doxygen style
...
llvm-svn: 3507
2002-08-25 22:54:55 +00:00
Vikram S. Adve
802e7716d8
Added function GetMemInstArgs and made FoldGetElemChain private.
...
llvm-svn: 3503
2002-08-24 21:03:10 +00:00
Vikram S. Adve
6f3268d39d
Added support for type inquiry in subclasses of InstTreeNode.
...
llvm-svn: 3502
2002-08-24 21:02:42 +00:00
Chris Lattner
499ebd8763
Implement classof for SetCondInst so that instcombine doesn't break on dyn_cast<SetCondInst>
...
llvm-svn: 3493
2002-08-23 18:30:58 +00:00
Chris Lattner
02fe752fbd
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3488
2002-08-22 23:37:24 +00:00
Chris Lattner
dfb3a2cd07
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3487
2002-08-22 23:37:20 +00:00
Chris Lattner
bacb7273e8
Load & Store Inst now no longer derive from MemAccessInst
...
llvm-svn: 3486
2002-08-22 22:54:10 +00:00
Chris Lattner
4011c62a8d
Load and Store now no longer derive from MemAccessInst. Indexing a load or
...
store is not possible anymore.
llvm-svn: 3482
2002-08-22 22:47:47 +00:00
Chris Lattner
d3b959cecb
doxygenize comments in header
...
llvm-svn: 3480
2002-08-22 22:46:20 +00:00
Chris Lattner
743e034b0c
Add doxygen comments to AliasAnalysis class
...
llvm-svn: 3475
2002-08-22 21:22:25 +00:00
Chris Lattner
eb123d290f
Fix bug: test/Regression/Assembler/2002-08-22-DominanceProblem.ll
...
llvm-svn: 3473
2002-08-22 20:39:27 +00:00
Chris Lattner
bcd4850b3b
Checkin new alias analysis infrastructure
...
llvm-svn: 3464
2002-08-22 18:25:20 +00:00
Chris Lattner
5c7c19cf14
Remove unneccesary method
...
llvm-svn: 3452
2002-08-22 15:57:37 +00:00
Vikram S. Adve
40f6a7b96a
Just some extra comments.
...
llvm-svn: 3446
2002-08-22 03:03:10 +00:00
Vikram S. Adve
0c763ee96f
Add method copyOperands().
...
llvm-svn: 3445
2002-08-22 03:01:44 +00:00
Chris Lattner
2ae73b1935
Add a class that is useful for hacking around linking problem due to
...
pass implementations not being linked in when they are used if the
implementation is in a .a file.
- Fighting with linking problem due to removing the ::ID elements. Now the
implementation .cpp files for analyses are not being included into gccas
and friends because it is linking to the .a file and there is no explicit
symbol reference to bring in the .o file. The new IncludeFile hack is the
result.
llvm-svn: 3434
2002-08-21 23:48:55 +00:00
Chris Lattner
c86203ace3
- Split Dominators.h into Dominators.h & PostDominators.h
...
llvm-svn: 3432
2002-08-21 23:43:50 +00:00
Chris Lattner
38ba7d5d59
- Implement the new AnalysisGroup feature, neccesary for Value#ing and pointer analysis
...
llvm-svn: 3425
2002-08-21 22:16:59 +00:00
Chris Lattner
3f2791e376
Add assertion checks to nail bugs early.
...
llvm-svn: 3424
2002-08-21 22:14:28 +00:00
Chris Lattner
a8d76433ce
- Make Pass::lookupPassInfo a public member
...
- Fix Pass::getAnalysis<AnalysisType>() to use dynamic_cast instead of a
static cast to handle the case where the cast from & two classes are not
related via inheritance.
llvm-svn: 3423
2002-08-21 22:13:33 +00:00
Chris Lattner
1a386b6a73
- Do not expose ::ID from any of the analyses anymore.
...
llvm-svn: 3417
2002-08-21 17:09:49 +00:00
Chris Lattner
c869ecbe42
- Do not expose ::ID from any of the analyses anymore.
...
llvm-svn: 3416
2002-08-21 17:09:45 +00:00
Chris Lattner
4b16963ca2
- Eliminate the need for analyses to expose an ::ID member.
...
llvm-svn: 3414
2002-08-21 17:08:37 +00:00
Chris Lattner
e87034074f
Add missing forward decl
...
llvm-svn: 3413
2002-08-21 15:38:45 +00:00
Chris Lattner
9a4c064881
Add new SetCondInst::getInverseCondition() method.
...
llvm-svn: 3404
2002-08-20 18:17:09 +00:00
Chris Lattner
323fe8f4a6
- ConstantPointerRefs are now automatically removed from the module table
...
when they are destroyed, which makes Constant::destroyConstant an actually
useful external interface. Expose these methods publicly.
- Implement destroyConstant on ConstPointerNull so that destroyConstant can
be used on any derived type constant safely.
llvm-svn: 3378
2002-08-18 00:39:59 +00:00
Chris Lattner
909b272663
Module's do not subclass from Value, so this code caused a segfault.
...
llvm-svn: 3376
2002-08-18 00:37:14 +00:00
Chris Lattner
b6a0873bd8
Add Module::dump() method
...
llvm-svn: 3374
2002-08-17 23:32:42 +00:00
Chris Lattner
8d1118fd8f
Remove the last traces of the NOT instruction
...
llvm-svn: 3346
2002-08-15 16:14:49 +00:00
Vikram S. Adve
2ba6b60374
Change opLabel numbers for Not and BNot.
...
Also, these tree nodes are now binary, not unary.
llvm-svn: 3344
2002-08-15 14:20:45 +00:00
Vikram S. Adve
243f187791
Added more helper functions for binary instructions emulating
...
unary Neg and Not: isNeg, isNot, getNegArgument, and getNotArgument.
llvm-svn: 3341
2002-08-15 14:15:48 +00:00
Chris Lattner
330b7ac76c
Remove support for Not ConstantExpr. This simplifies the unary case to only
...
have to support the cast instruction, so the function is renamed to getCast.
llvm-svn: 3328
2002-08-14 18:24:09 +00:00
Chris Lattner
8fd96fcdaf
Remove support for unary operators.
...
llvm-svn: 3326
2002-08-14 18:19:46 +00:00
Chris Lattner
9c968aaa5a
Remove reference to GenericUnaryInst class
...
llvm-svn: 3325
2002-08-14 18:18:50 +00:00
Chris Lattner
875d512b49
Remove support for unary instructions
...
llvm-svn: 3324
2002-08-14 18:18:28 +00:00
Chris Lattner
725b9e5033
Remove constant propogation support for NOT instruction
...
llvm-svn: 3321
2002-08-14 18:17:07 +00:00
Chris Lattner
b7a74232bc
Expose two new static methods from BinaryOperator: createNeg, createNot
...
llvm-svn: 3314
2002-08-14 17:51:29 +00:00
Vikram S. Adve
2d01206a37
Add method MachineInstr::substituteValue() which substitutes
...
one Value with another one in all operands and implicit references
of the machine instruction.
Also add method MachineOperand::getVRegValueOrNull().
llvm-svn: 3307
2002-08-14 16:54:11 +00:00
Chris Lattner
1f25c93ac0
- Rename ConstantGenericIntegral -> ConstantIntegral
...
- Add new methods to ConstantIntegral: getMaxValue, getMinValue,
getAllOnesValue
llvm-svn: 3298
2002-08-13 17:50:18 +00:00
Chris Lattner
f43b003aba
Return const char * const instead of std::string from get register name method
...
llvm-svn: 3294
2002-08-12 21:24:55 +00:00
Chris Lattner
41e99a07f1
- Added a new superclass of ConstantBool/ConstantInt: ConstantGenericIntegral
...
- Moved InstCombine: isMaxValue, isMinValue, isAllOnesValue to Constants.h
llvm-svn: 3293
2002-08-12 21:21:21 +00:00
Chris Lattner
e836b583e0
* IntervalPartition no longer derives from vector
...
llvm-svn: 3281
2002-08-09 22:52:06 +00:00
Chris Lattner
2253a154d7
Do not add an extra vtable to EVERY machineinstr created.
...
llvm-svn: 3280
2002-08-09 21:49:21 +00:00
Chris Lattner
a09b01b2c1
UnaryOperator::create should take a name just like BinaryOperator::create
...
llvm-svn: 3279
2002-08-09 21:39:38 +00:00
Chris Lattner
959a5fbf8e
* Removed extraneous #includes
...
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes
llvm-svn: 3278
2002-08-09 20:08:06 +00:00
Chris Lattner
02e7a86fec
* Removed extraneous #includes
...
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes
llvm-svn: 3277
2002-08-09 20:08:03 +00:00
Chris Lattner
107914c2ac
Change machinecode for instruction to not inherit from vector.
...
llvm-svn: 3274
2002-08-09 20:04:28 +00:00
Chris Lattner
06524e2f07
The second parameter of hash_set is the default, remove it.
...
llvm-svn: 3273
2002-08-09 19:40:42 +00:00
Chris Lattner
f0ed55d1ee
- Cleaned up the interface to AnalysisUsage to take analysis class names
...
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
llvm-svn: 3265
2002-08-08 19:01:30 +00:00
Chris Lattner
4b2ee2e848
- Cleaned up the interface to AnalysisUsage to take analysis class names
...
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
llvm-svn: 3263
2002-08-08 19:01:11 +00:00
Chris Lattner
5b13472129
Simplify interface to parsers.
...
llvm-svn: 3255
2002-08-07 18:36:27 +00:00
Vikram S. Adve
e93d33cc24
Add function GetConstantValueAsUnsignedInt.
...
llvm-svn: 3249
2002-08-04 20:55:59 +00:00
Vikram S. Adve
a173017d7b
Add MemAccessInst::getNumIndices().
...
llvm-svn: 3234
2002-08-03 13:22:36 +00:00
Chris Lattner
edefd157a7
Changes to be GCC 3.1 friendly
...
llvm-svn: 3184
2002-07-31 19:31:59 +00:00
Chris Lattner
188d8afeee
Remove obsolete, confusing, method
...
llvm-svn: 3175
2002-07-31 01:45:02 +00:00
Vikram S. Adve
43af9687a6
Add GlobalDSGraph -- a common graph that holds externally visible nodes.
...
llvm-svn: 3169
2002-07-30 22:02:04 +00:00
Chris Lattner
353faddb1c
Add hooks to get information out of concrete pass manager implementations
...
llvm-svn: 3164
2002-07-30 19:49:39 +00:00
Chris Lattner
a13a2dac7e
Cleanup ConstantExpr handling:
...
* Correctly delete TypeHandles in AsmParser. In addition to not leaking
memory, this prevents a bug that could have occurred when a type got
resolved that the constexpr was using
* Check for errors in the AsmParser instead of hitting assertion failures
deep in the code
* Simplify the interface to the ConstantExpr class, removing unneccesary
parameters to the ::get* methods.
* Rename the 'getelementptr' version of ConstantExpr::get to
ConstantExpr::getGetElementPtr
llvm-svn: 3160
2002-07-30 18:54:22 +00:00
Chris Lattner
0d273698df
* Implement stuff so that code can declare that they only depend on the CFG of
...
a function, not on anything else. This speeds up GCCAS a lot.
llvm-svn: 3156
2002-07-30 16:27:32 +00:00
Chris Lattner
163f8b5b8f
Implement constant propogation of logical (and, or, xor) expressions.
...
Fixes testcase: test/Regression/Transforms/ConstProp/logicaltest.ll
llvm-svn: 3153
2002-07-30 16:24:25 +00:00
Chris Lattner
c3b3a825eb
Expose instruction selection as a pass instead of a global function
...
llvm-svn: 3145
2002-07-30 03:55:29 +00:00
Chris Lattner
bd3e2a09ec
Add rough support for LLC passes
...
llvm-svn: 3144
2002-07-30 03:55:01 +00:00
Chris Lattner
153ccdcac0
Implement a new RemoveSuccessor function
...
llvm-svn: 3130
2002-07-29 22:32:06 +00:00