Chris Lattner
9655e54d21
Implement ensureTypeAvailable
...
Implement ConstPoolInt class
llvm-svn: 215
2001-07-20 19:16:02 +00:00
Chris Lattner
4f6031f3e7
Add support for constant propogation of multiplies
...
llvm-svn: 214
2001-07-20 19:15:36 +00:00
Chris Lattner
5e5abe3eaa
Factor out WriteAsOperand.
...
llvm-svn: 213
2001-07-20 19:15:21 +00:00
Chris Lattner
1caf0bbd4e
Add a comment.
...
llvm-svn: 212
2001-07-20 19:15:08 +00:00
Chris Lattner
197390e985
Fix nasty typo
...
llvm-svn: 204
2001-07-20 04:39:07 +00:00
Chris Lattner
3e37ec7c0a
Support external methods
...
llvm-svn: 200
2001-07-15 21:43:45 +00:00
Chris Lattner
a7620d9656
Implement forward/external declarations for methods.
...
llvm-svn: 196
2001-07-15 06:35:59 +00:00
Chris Lattner
17f729e269
Implement forward/external declarations for methods. Also, emit an error if a method
...
is defined more than once, instead of crashing.
llvm-svn: 195
2001-07-15 06:35:53 +00:00
Chris Lattner
d06dd69e73
Add support for assembly printing fp constants
...
llvm-svn: 191
2001-07-15 00:18:39 +00:00
Chris Lattner
4d44c2ba81
Add support to the bytecode writer to recognize floating point constants
...
llvm-svn: 190
2001-07-15 00:17:23 +00:00
Chris Lattner
f435e200b1
Add support to the bytecode reader to recognize floating point constants
...
llvm-svn: 189
2001-07-15 00:17:18 +00:00
Chris Lattner
212f70d92e
Add support to the parser to recognize floating point constants
...
llvm-svn: 188
2001-07-15 00:17:01 +00:00
Chris Lattner
f2a738cfe2
* ValueHolder now takes 3 arguments
...
* Added a few methods to ConstantPool
* ConstPoolVal no longer derives from Value
* Method & Module multiply inherit from SymTabValue & Value now
* Added a GetElementPtrInst::isStructSelector() method
llvm-svn: 184
2001-07-14 06:13:19 +00:00
Chris Lattner
5451c9e977
Add knowledge about the struct form of the GetElementPtr instruction
...
llvm-svn: 183
2001-07-14 06:11:51 +00:00
Chris Lattner
5b1200bf8e
Remove dependency on the structure of ValueHolder.
...
llvm-svn: 182
2001-07-14 06:11:26 +00:00
Chris Lattner
dbfb7d8042
* The parent of a constant pool is a symtabvalue, not a value.
...
llvm-svn: 181
2001-07-14 06:10:49 +00:00
Chris Lattner
32e96bcb54
The parent of a constant pool is a symtabvalue, not a value.
...
llvm-svn: 180
2001-07-14 06:10:33 +00:00
Chris Lattner
56f73d45f5
Added some comments, preparing to add global variables and method prototypes
...
llvm-svn: 179
2001-07-14 06:10:16 +00:00
Chris Lattner
5446f8a542
* The parent of a constant pool is a SymTabValue, not a value.
...
llvm-svn: 178
2001-07-14 06:08:51 +00:00
Chris Lattner
5a2d2b1f0a
Made the following changes:
...
* ValueHolder became a 3 argument template. This allows for BasicBlock to
use the value holder arg as a typesafe parent pointer.
* SymTabValue no longer inherits from Value
* Method does not inherit from only SymTabValue. Now it inherits from both
STV & Value.
* Module does not inherit from only SymTabValue. Now it inherits from both
STV & Value.
* Updated the SymTabValue.h file to reference SymTabValue instead of STDef
in several places
* Added isArraySelector & isStructSelector to GetElementPtr instruction
llvm-svn: 177
2001-07-14 06:07:58 +00:00
Chris Lattner
2e9fee4702
Add DebugValue member.
...
llvm-svn: 175
2001-07-12 23:35:26 +00:00
Chris Lattner
d6c5a769ea
Don't clean out the type plane of the constant pool... this is a hack. FIXME
...
llvm-svn: 172
2001-07-09 19:38:52 +00:00
Chris Lattner
d9c40e355e
Make sure that types go in the constant pool if they are used.
...
llvm-svn: 171
2001-07-09 19:38:36 +00:00
Chris Lattner
62ecb4a137
Implementation of Store & GetElementPtr
...
llvm-svn: 164
2001-07-08 23:22:50 +00:00
Chris Lattner
31feae8550
Implement checking for new instructions
...
llvm-svn: 163
2001-07-08 21:18:49 +00:00
Chris Lattner
d8bebcd517
Implemented shl, shl, & load instructions
...
llvm-svn: 161
2001-07-08 21:10:27 +00:00
Chris Lattner
49c643262e
Moved Cast from being a Unary instruction to being an "Other" instruction
...
llvm-svn: 160
2001-07-08 19:03:27 +00:00
Chris Lattner
fb8ed0cf3a
Use the CDG to mark branches alive on demand.
...
llvm-svn: 159
2001-07-08 18:38:36 +00:00
Chris Lattner
1547114cbf
Fixed post dominator frontiers! Yaay!
...
llvm-svn: 157
2001-07-08 05:54:09 +00:00
Chris Lattner
a682182f64
Neg instruction removed. Cast instruction implemented.
...
llvm-svn: 156
2001-07-08 04:57:15 +00:00
Chris Lattner
1fd1a3a7b4
Removing unnecesary file
...
llvm-svn: 154
2001-07-07 20:54:19 +00:00
Chris Lattner
87d478287b
Convert BinaryOperand and UnaryOperator to only take instruction types of
...
the appropriate enum
llvm-svn: 153
2001-07-07 20:17:23 +00:00
Chris Lattner
b1ca9cbceb
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
llvm-svn: 152
2001-07-07 19:24:15 +00:00
Chris Lattner
a073acb22d
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!
llvm-svn: 149
2001-07-07 08:36:50 +00:00
Chris Lattner
37099990b3
Changed memory reference instructions to store the result as the implicit
...
type of the instruction.
llvm-svn: 148
2001-07-07 08:36:30 +00:00
Chris Lattner
32503d5637
Fixed some error messages to be nicer
...
llvm-svn: 147
2001-07-07 08:36:05 +00:00
Chris Lattner
29aae157f7
Add method to unify all exit nodes of a method
...
llvm-svn: 143
2001-07-06 16:58:36 +00:00
Chris Lattner
c385bebc89
Implement support for postdominators, except in dom frontiers
...
llvm-svn: 142
2001-07-06 16:58:22 +00:00
Chris Lattner
8024bde7c7
Update to include right file
...
llvm-svn: 138
2001-07-06 16:32:07 +00:00
Chris Lattner
81f3ace753
IntervalPartition was changed to inherit from vector<Interval*> instead of
...
contain it so that it would have full iterator access without much work.
Writer includes code to print out IntervalPartition's now.
llvm-svn: 133
2001-07-03 15:28:35 +00:00
Chris Lattner
fa3ac26d22
Code got moved from the lib/Assembly/Writer/IntervalWriter.cpp file to
...
here. Updates to correct description n stuff.
llvm-svn: 129
2001-07-03 05:36:34 +00:00
Chris Lattner
a7f22e53c0
Add printing code for dominator info
...
llvm-svn: 125
2001-07-02 05:46:47 +00:00
Chris Lattner
081aabc330
Checkin of new dominator calculation routines. These will be improved in
...
the future to do post dominators and stuff
llvm-svn: 124
2001-07-02 05:46:38 +00:00
Chris Lattner
0c94a300eb
Moved deleter to include/llvm/Tools/STLExtras.h
...
llvm-svn: 120
2001-07-02 01:08:08 +00:00
Chris Lattner
b28986ffc7
Initial checkin. Should print dead instructions, except it doesn't do
...
control dependencies. :(
llvm-svn: 119
2001-06-30 06:39:11 +00:00
Chris Lattner
1960b3c6d2
Rename DoSparseConditionalConstantProp -> DoSCCP
...
llvm-svn: 117
2001-06-30 06:37:43 +00:00
Chris Lattner
d42d492734
Optimizations got their own header files
...
Optimizations now live in the 'opt' namespace
include/llvm/Opt was renamed include/llvm/Optimizations
llvm-svn: 113
2001-06-30 04:36:40 +00:00
Chris Lattner
31cf984332
Implement reduceApply method
...
llvm-svn: 112
2001-06-30 04:35:40 +00:00
Chris Lattner
c10245352c
Add a new pop_back() method
...
llvm-svn: 111
2001-06-30 04:35:21 +00:00
Chris Lattner
7ce8b17e60
Export ConstantFoldTerminator, allow it to fold conditional branches to
...
the same label.
llvm-svn: 107
2001-06-29 23:56:58 +00:00
Chris Lattner
10b250eb4d
Added documentation. Constant fold terminators.
...
llvm-svn: 106
2001-06-29 23:56:23 +00:00
Chris Lattner
2dd58aefa5
Add a check to avoid allowing V->replaceAllUsesWith(V)
...
llvm-svn: 104
2001-06-29 05:25:51 +00:00
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
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
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
223796ccf2
Convert postincrements to more efficient preincrements
...
llvm-svn: 81
2001-06-27 23:28:02 +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
601012721c
New file due to the Intervals.h splitup
...
llvm-svn: 66
2001-06-24 04:07:44 +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
4c16155c36
Prepare for split between Interval, IntervalIterator, and IntervalIPartition
...
llvm-svn: 60
2001-06-24 03:25:01 +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
4b94e23bd0
Add a space to the PHI node output code to make it look nicer
...
llvm-svn: 53
2001-06-21 05:29:56 +00:00
Chris Lattner
b20a15d334
Moved printing code to the Assembly/Writer library.
...
Code now detects looping intervals
llvm-svn: 52
2001-06-21 05:27:22 +00:00
Chris Lattner
d79faa35af
Implement the new Interval::isLoop method
...
Implement destructor to free memory
llvm-svn: 51
2001-06-21 05:26:15 +00:00
Chris Lattner
778de94723
Get rid of a silly printout that isn't needed right now
...
llvm-svn: 45
2001-06-20 23:09:39 +00:00
Chris Lattner
f86e38e452
Add capability to print a derived interval graph
...
llvm-svn: 42
2001-06-20 22:44:38 +00:00
Chris Lattner
5035efaeda
Add capability to build a derived interval graph
...
llvm-svn: 41
2001-06-20 22:44:32 +00:00
Chris Lattner
28ae5cbcb5
Initial Checking of Interval handling code
...
llvm-svn: 39
2001-06-20 20:09:55 +00:00
Chris Lattner
d286a997d3
Add a test case for interval code
...
llvm-svn: 36
2001-06-20 19:27:11 +00:00
Chris Lattner
5ba5f88c35
Updates to work with new cfg namespace
...
llvm-svn: 29
2001-06-13 19:55:22 +00:00
Chris Lattner
874ddadf72
Updates to support
...
* Changes in PHI node structure
llvm-svn: 25
2001-06-11 15:04:40 +00:00
Chris Lattner
931ef3bf05
Updates to support
...
* Changes in PHI node structure
* Change to PHI syntax
llvm-svn: 24
2001-06-11 15:04:20 +00:00
Chris Lattner
5f46e8c9da
Moved getBinaryOperator to the BinaryOperator class and the getUnaryOperator
...
to the UnaryOperator class (from the Instruction class).
llvm-svn: 21
2001-06-08 21:30:13 +00:00
Chris Lattner
7e0d6e05ac
Updated to work with new CFG.h file.
...
llvm-svn: 15
2001-06-07 21:18:45 +00:00
Chris Lattner
e6c4ea9861
Add extra method to PHI node class
...
llvm-svn: 11
2001-06-07 16:59:37 +00:00
Chris Lattner
d821c2af37
Significant rework. DCE is still not done (see #ifdef'd out parts)
...
but at least the stuff that is checked in, now works.
llvm-svn: 10
2001-06-07 16:59:26 +00:00
Chris Lattner
a2f01878b7
Fixed to print slightly differently. Added use counts for labels
...
llvm-svn: 9
2001-06-07 16:58:55 +00:00
Chris Lattner
e358b22776
Fixes for BB iterators, additional methods added for DCE pass
...
llvm-svn: 8
2001-06-07 16:58:36 +00:00
Chris Lattner
2f7c963559
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00