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