Chris Lattner
615d3cf40d
Add implementation of BasicBlock::removePredecessor code that was factored
...
out of DCE.cpp
llvm-svn: 103
2001-06-29 05:25:23 +00:00
Chris Lattner
84f07396d3
* Factored RemovePredecessorFromBlock into BasicBlock::removePredecessor
...
* Avoid messing around with this case:
br label %A
%A: br label %A
* Enable optimizations that are correct now.
llvm-svn: 102
2001-06-29 05:24:28 +00:00
Chris Lattner
e4abb60948
We need to make sure to remove PHI nodes in the successor that cannot be
...
executed when removing branch dest.
llvm-svn: 101
2001-06-29 05:23:10 +00:00
Chris Lattner
d77f3c0cbd
Added a note about a new verification the verifier should do
...
Removed a redundant check
llvm-svn: 100
2001-06-29 05:22:12 +00:00
Chris Lattner
17556f82d0
Added new removePredecessor method prototype
...
llvm-svn: 99
2001-06-29 05:21:42 +00:00
Chris Lattner
9b07b7168b
Added note, moved note
...
llvm-svn: 98
2001-06-29 05:21:05 +00:00
Chris Lattner
44601ba46a
Fixed the obnoxious problem that caused an entire directory to rebuild
...
even if you only change one .cpp file. Yaay
llvm-svn: 97
2001-06-29 05:20:16 +00:00
Chris Lattner
4cee8d8ffb
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
llvm-svn: 96
2001-06-27 23:41:11 +00:00
Chris Lattner
347389dae8
Add a new Sparse Conditional Constant Propogation pass
...
llvm-svn: 95
2001-06-27 23:38:11 +00:00
Chris Lattner
bef00adb40
Add command line arguments for Constant Pool Merging & Sparse Conditional Constant Prop
...
llvm-svn: 94
2001-06-27 23:37:58 +00:00
Chris Lattner
e32de63e07
Put in test of SCCP. Watch out though, because we need to sort the
...
constant pool for the final check to work. :(
llvm-svn: 93
2001-06-27 23:37:22 +00:00
Chris Lattner
0ee411c080
Change to use the new GenericBinaryInst class. Support lots more operators.
...
llvm-svn: 92
2001-06-27 23:36:49 +00:00
Chris Lattner
1a67fb8860
Misc cleanup
...
llvm-svn: 91
2001-06-27 23:36:09 +00:00
Chris Lattner
f222bf33c3
* Expose DoConstantPoolMerging
...
* Cleanups (post->pre increment, new cleaner API, etc)
* Moved stuff into ConstantHandling.h
llvm-svn: 90
2001-06-27 23:35:26 +00:00
Chris Lattner
4c8ba81f21
Convert ugly postincrement to efficient preincrement
...
llvm-svn: 89
2001-06-27 23:34:01 +00:00
Chris Lattner
7798de1382
* Move stuff around a bit.
...
* Add reduce_apply_bool
llvm-svn: 88
2001-06-27 23:32:12 +00:00
Chris Lattner
4400f659f1
Add instructions to fold unary and binary instructions.
...
llvm-svn: 87
2001-06-27 23:31:34 +00:00
Chris Lattner
780cfa5381
* Use the new reduce_apply_bool template
...
* Expose Constant Pool Merging from ConstantProp.cpp
* Include definitions for SCCP pass
* InstListType is not neccesary anymore
llvm-svn: 86
2001-06-27 23:31:14 +00:00
Chris Lattner
a32c04fcb1
getBasicBlocks() is not needed anymore for reading Method data
...
llvm-svn: 85
2001-06-27 23:30:11 +00:00
Chris Lattner
608fe88627
Added methods to make dealing with switches and branch instructions
...
more tolerable.
llvm-svn: 84
2001-06-27 23:29:41 +00:00
Chris Lattner
c112b3de44
Minor formating changes
...
llvm-svn: 83
2001-06-27 23:29:21 +00:00
Chris Lattner
8c2076b84e
Make a new GenericBinaryInst class, instead of providing lots of silly
...
little classes.
llvm-svn: 82
2001-06-27 23:28:50 +00:00
Chris Lattner
223796ccf2
Convert postincrements to more efficient preincrements
...
llvm-svn: 81
2001-06-27 23:28:02 +00:00
Chris Lattner
642a3063da
Add a new slew of functions to allow dynamic_cast<> like operation for
...
upcasting Value's to their subclasses.
llvm-svn: 80
2001-06-27 23:27:42 +00:00
Chris Lattner
0972270aaf
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.
llvm-svn: 79
2001-06-27 23:26:41 +00:00
Chris Lattner
eed707034c
Add more notes
...
llvm-svn: 78
2001-06-27 23:24:50 +00:00
Chris Lattner
f124461c30
Filter out some more stuff
...
llvm-svn: 77
2001-06-27 23:24:22 +00:00
Chris Lattner
01683cca32
Moved UnaryOperator::create to InstrTypes.cpp until there is an iUnaryOps.cpp
...
Moved BinaryOperator::create to iBinaryOperators.cpp
Add getUniqueName to SymbolTable
llvm-svn: 76
2001-06-25 07:33:13 +00:00
Chris Lattner
dbdaaef7d5
Implement induction variable injection!
...
llvm-svn: 75
2001-06-25 07:32:19 +00:00
Chris Lattner
31e23cdeb4
Renamed get.*Operator to create seeing that it would have to be qualified
...
with the classname anyways.
llvm-svn: 74
2001-06-25 07:31:31 +00:00
Chris Lattner
7221d33514
* 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
llvm-svn: 73
2001-06-25 07:31:05 +00:00
Chris Lattner
c3a6f546de
A silly stupid test of the loop depth calculator was added. REMOVE in the
...
future.
llvm-svn: 72
2001-06-25 03:55:37 +00:00
Chris Lattner
ed59025460
IntervalPartition: recode to use IntervalIterator to do all the work
...
LoopDepth.cpp: new file that calculates the depth of a loop, using
IntervalPartitions.
llvm-svn: 71
2001-06-25 03:55:04 +00:00
Chris Lattner
554c161f1f
Add a helper function bind_obj
...
llvm-svn: 70
2001-06-25 03:54:32 +00:00
Chris Lattner
3fe4504c28
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.
llvm-svn: 69
2001-06-25 03:54:14 +00:00
Chris Lattner
c17f93528b
CFG.h: change the iterator tag
...
Method.h: Add an iterator type.
llvm-svn: 68
2001-06-25 03:52:19 +00:00
Chris Lattner
741aaad071
ValueHolder's aren't interseting to me anymore
...
llvm-svn: 67
2001-06-25 03:51:53 +00:00
Chris Lattner
601012721c
New file due to the Intervals.h splitup
...
llvm-svn: 66
2001-06-24 04:07:44 +00:00
Chris Lattner
db1d8bdf34
New files due to the Intervals.h splitup
...
llvm-svn: 65
2001-06-24 04:07:37 +00:00
Chris Lattner
72bd8ccbac
Add a useless phi for testing with InductionVariables stuff
...
llvm-svn: 64
2001-06-24 04:06:23 +00:00
Chris Lattner
f64a8936e5
#include a different header due to Intervals.h splitting up
...
llvm-svn: 63
2001-06-24 04:05:45 +00:00
Chris Lattner
dec727e346
IntervalPartition & IntervalIterator classes have been split out into
...
their own .h files & .cpp file
llvm-svn: 62
2001-06-24 04:05:21 +00:00
Chris Lattner
658a50fe1b
IntervalPartition & IntervalIterator classes have been split out into
...
their own .h files
llvm-svn: 61
2001-06-24 04:05:09 +00:00
Chris Lattner
4c16155c36
Prepare for split between Interval, IntervalIterator, and IntervalIPartition
...
llvm-svn: 60
2001-06-24 03:25:01 +00:00
Chris Lattner
2e2e27a1af
Addition of IntervalIterator. Preparing for rename of Intervals.h to
...
Interval.h, IntervalPartition.h, and IntervalIterator.h
llvm-svn: 59
2001-06-24 03:22:59 +00:00
Chris Lattner
eb717fc873
Added notes
...
llvm-svn: 58
2001-06-24 02:01:31 +00:00
Chris Lattner
4c4f178723
Implement a lot more functionality. Now loop invariant and linear
...
induction variables are correctly identified.
llvm-svn: 57
2001-06-22 02:24:38 +00:00
Chris Lattner
34b62a04b6
Interval::HeaderNode is now accessed thorugh an accessor function
...
llvm-svn: 56
2001-06-22 02:23:39 +00:00
Chris Lattner
97c3480075
Add comments
...
Interval::HeaderNode is now accessed thorugh an accessor function
llvm-svn: 55
2001-06-22 02:23:27 +00:00
Chris Lattner
dc36e44adc
Add accessor methods to binary/unary operators
...
Add extra helper methods to PHI class
llvm-svn: 54
2001-06-22 02:21:42 +00:00