Chris Lattner
fb3f24fd57
Fix stupid typo
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-09 16:54:29 +00:00
Chris Lattner
ab5ac6bb38
Implementation of Store & GetElementPtr
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 23:22:50 +00:00
Chris Lattner
027dcc5b22
Implemented shl, shl, & load instructions
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 21:10:27 +00:00
Chris Lattner
71496b3b50
Moved Cast from being a Unary instruction to being an "Other" instruction
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 19:03:27 +00:00
Chris Lattner
cbab0f7edd
Add a new "addOperand" method to User.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 18:38:18 +00:00
Chris Lattner
0908309e3c
Neg instruction removed. Cast instruction implemented.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 04:57:15 +00:00
Chris Lattner
9f3d27654a
Convert BinaryOperand and UnaryOperator to only take instruction types of
...
the appropriate enum
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 20:17:23 +00:00
Chris Lattner
a41f50dea8
Broad superficial changes:
...
* Renamed getOpcode to getOpcodeName
* Changed getOpcodeName to return a const char * instead of string
* Added a getOpcode method to replace getInstType
* Changed code to use getOpcode instead of getInstType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 19:24:15 +00:00
Chris Lattner
30f24a402c
Devirtualize User::dropAllReferences
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 19:00:36 +00:00
Chris Lattner
f229ed5248
Remove dtor's that simply call dropAllReferences
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 18:42:52 +00:00
Chris Lattner
c8b25d40cb
Changed the fundemental architecture of Operands for Instructions. Now
...
Operands are maintained as a vector<Use> in the User class, and operator
iterators are provided as before. Getting an operand no longer requires
a virtual function call.
WARNING: getOperand(x) where x >= getNumOperands() will now assert instead
of returning null!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 08:36:50 +00:00
Chris Lattner
87d0461d5b
New file, includes method to merge exit nodes together
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-06 16:57:52 +00:00
Chris Lattner
c348d21bf6
* Add a DominatorBase base class to maintain root of Dominator info
...
* Implement post dominator support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-06 16:57:21 +00:00
Chris Lattner
18c9f915f2
* Added comments
...
* Made iterators inherit from appropriate iterator base class
* Abstracted out graphs from depth first iterator
* Add "Inverse" traversal of CFG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-06 16:56:17 +00:00
Chris Lattner
a49e015180
IntervalPartition was changed to inherit from vector<Interval*> instead of
...
contain it so that it would have full iterator access without much work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-03 15:28:08 +00:00
Chris Lattner
1a46243e7f
Checkin of new Analysis result printing header
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-03 05:37:26 +00:00
Chris Lattner
d1ee90f1a5
Remove code for printing out Analysis data structures. It got moved
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-03 05:35:52 +00:00
Chris Lattner
953932d779
Update documentation a bit, correct #include guard
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-03 05:35:23 +00:00
Chris Lattner
f50b952b93
Enable printing of dominator related information.
...
Theis will eventually be moved!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-02 05:45:30 +00:00
Chris Lattner
70b6337d68
Add new anaysis routines for building dominator related information
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-02 05:45:17 +00:00
Chris Lattner
577b15f70e
Addition of 'deleter' function.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-02 01:09:41 +00:00
Chris Lattner
8ea0755f98
Add prototypes for ADCE pass
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 06:37:16 +00:00
Chris Lattner
d8d8c836e7
Rename DoSparseConditionalConstantProp to DoSCCP
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 06:37:01 +00:00
Chris Lattner
a7e26118a2
Add a new pop_back() method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:35:21 +00:00
Chris Lattner
b9b8959091
The ConstRules class got moved to the opt namespace
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:35:01 +00:00
Chris Lattner
d180e0fda7
Add a reduceApply method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:34:42 +00:00
Chris Lattner
50d0b7ec3f
Split AllOpts.h into lots of little .h files.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:34:07 +00:00
Chris Lattner
4b52471bed
Added prototype for ConstantFoldTerminator
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 23:56:00 +00:00
Chris Lattner
7b6f5a3ee9
Added new removePredecessor method prototype
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 05:21:42 +00:00
Chris Lattner
7fc9fe3439
Miscellaneous cleanups:
...
* Convert post to pre-increment for for loops
* Use generic programming more
* Use new Value::cast* instructions
* Use new Module, Method, & BasicBlock forwarding methods
* Use new facilities in STLExtras.h
* Use new Instruction::isPHINode() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:41:11 +00:00
Chris Lattner
42e018c805
* Move stuff around a bit.
...
* Add reduce_apply_bool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:32:12 +00:00
Chris Lattner
6bb09d96a0
Add instructions to fold unary and binary instructions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:31:34 +00:00
Chris Lattner
3596366bed
* Use the new reduce_apply_bool template
...
* Expose Constant Pool Merging from ConstantProp.cpp
* Include definitions for SCCP pass
* InstListType is not neccesary anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:31:14 +00:00
Chris Lattner
776885f34d
getBasicBlocks() is not needed anymore for reading Method data
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:30:11 +00:00
Chris Lattner
a576e17ced
Added methods to make dealing with switches and branch instructions
...
more tolerable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:29:41 +00:00
Chris Lattner
eef4d787f0
Minor formating changes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:29:21 +00:00
Chris Lattner
9af81a685e
Make a new GenericBinaryInst class, instead of providing lots of silly
...
little classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:28:50 +00:00
Chris Lattner
e02cb164b1
Add a new slew of functions to allow dynamic_cast<> like operation for
...
upcasting Value's to their subclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:27:42 +00:00
Chris Lattner
1020b3982c
Add extra forwarding accessor methods so that getMethodList(), getBasicBlocks()
...
and getInstList() are obsolete... except for when modifying those lists. This
makes code much more succinct and to the point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:26:41 +00:00
Chris Lattner
3bcd6394ec
* Rename get.*Operator to create seeing that it would have to be qualified
...
with the classname anyways.
* Add an isPHINode() method to Instruction
* Add getUniqueName() to SymbolTable class
* Add an insert method to ValueHolder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 07:31:05 +00:00
Chris Lattner
3704c8cfff
Add a helper function bind_obj
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 03:54:32 +00:00
Chris Lattner
4dd88f6fbf
Big changes. Interval*.h is now more or less finalized. IntervalPartition
...
is recoded to use IntervalIterators. IntervalIterators can now maintain
their own memory or let an external entity do it.
Loop depth is a new user of IntervalPartition for calculating the loop
nesting depth of a basic block
TODO: add IntervalPartition capability to split intervals between the looping
portion and the "tail" portion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 03:54:14 +00:00
Chris Lattner
d6a7b7552f
CFG.h: change the iterator tag
...
Method.h: Add an iterator type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 03:52:19 +00:00
Chris Lattner
a9a96efba4
New files due to the Intervals.h splitup
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-24 04:07:37 +00:00
Chris Lattner
75517097e7
IntervalPartition & IntervalIterator classes have been split out into
...
their own .h files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-24 04:05:09 +00:00
Chris Lattner
cf1760aff0
Addition of IntervalIterator. Preparing for rename of Intervals.h to
...
Interval.h, IntervalPartition.h, and IntervalIterator.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-24 03:22:59 +00:00
Chris Lattner
1a750e1d40
Add comments
...
Interval::HeaderNode is now accessed thorugh an accessor function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-22 02:23:27 +00:00
Chris Lattner
fe0a67c74e
Add accessor methods to binary/unary operators
...
Add extra helper methods to PHI class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-22 02:21:42 +00:00
Chris Lattner
18d64ede9a
New header file defined with neeto utilities put in one place
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-21 05:25:51 +00:00
Chris Lattner
681cf74ab5
Modified to use the new reduce_apply algorithm
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-21 05:25:33 +00:00
Chris Lattner
be0b11c611
* Added capability to print out an interval
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-21 05:25:09 +00:00
Chris Lattner
2100f8cced
* Added comments
...
* Added prototype for new Interval::isLoop method
* Added destructor to free memory
* Added IntervalPartition::isDegeneratePartition method
* Added IntervalPartition::size() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-21 05:24:46 +00:00
Chris Lattner
ed465bc265
Add capability to build a derived interval graph
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-20 22:44:32 +00:00
Chris Lattner
bb76d9d080
Factor the predeclarations of the CFG.h functionality into a seperate, new header
...
file: CFGdecls.h
This allows the addition of BasicBlock::(pred|succ)_iterator typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-20 22:44:16 +00:00
Chris Lattner
113b2ffd35
Add an optimization stub
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-20 19:26:21 +00:00
Chris Lattner
564de7d79b
New file: Interval analysis support
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-20 19:26:12 +00:00
Chris Lattner
966644628d
Implement support for writing VCG format output
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-13 19:55:13 +00:00
Chris Lattner
a5a83b4fa5
Move contents to the cfg namespace.
...
Implement post order and reverse post order iterators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-13 19:55:02 +00:00
Chris Lattner
143da691f0
Updates to support
...
* Changes in PHI node structure
* Fix to Predecessor iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-11 15:04:06 +00:00
Chris Lattner
477c2ec3e0
Moved getBinaryOperator to the BinaryOperator class and the getUnaryOperator
...
to the UnaryOperator class (from the Instruction class).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-08 21:30:13 +00:00
Chris Lattner
760dfe6596
Beautify the source a bit.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-08 21:07:26 +00:00
Chris Lattner
586bd03dc1
Include support for reverse iteration.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-08 20:52:54 +00:00
Chris Lattner
d842e77ca9
Added reverse depth first capability, fixed depth first capability
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-08 00:35:14 +00:00
Chris Lattner
1f0d48113c
Moved iterators to the new CFG.h file.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-07 21:18:35 +00:00
Chris Lattner
7170838f84
New file
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-07 21:18:08 +00:00
Chris Lattner
bbcfc51f3b
Fixes for BB iterators, additional methods added for DCE pass
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-07 16:58:36 +00:00
Chris Lattner
009505452b
Initial revision
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-06 20:29:01 +00:00