Chris Lattner
488f202019
Assertion could never fail because another one would in it's place. :)
...
llvm-svn: 1449
2001-12-13 00:45:40 +00:00
Chris Lattner
d89106f96b
Actually return true when a change has been made
...
llvm-svn: 1425
2001-12-05 19:41:33 +00:00
Chris Lattner
7059b60173
Fix a bug introduced by "internal linkage" work.
...
llvm-svn: 1415
2001-12-04 18:01:49 +00:00
Chris Lattner
8ec5ceb110
Fix bugs, don't do external methods which causes segv.
...
llvm-svn: 1414
2001-12-04 08:13:06 +00:00
Chris Lattner
bd85988c94
Implement induction variable simplification
...
llvm-svn: 1411
2001-12-04 04:32:29 +00:00
Chris Lattner
c4a5815033
Renamed inst_const_iterator -> const_inst_iterator
...
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()
llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
f6b7da2bb5
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
bcf2df7058
Split the PHINode class out from the iOther.h file into the iPHINode.h file
...
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner
a337749b35
Initial checkin of indvar stuff
...
llvm-svn: 1404
2001-12-03 17:28:42 +00:00
Chris Lattner
463cc31132
Create a new #include "Support/..." directory structure to move things
...
from "llvm/Support/..." that are not llvm dependant.
Move files and fix #includes
llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
d10d3f1015
Misc cleanups
...
llvm-svn: 1377
2001-11-26 18:57:38 +00:00
Chris Lattner
8fd567523c
Expose constant propogation of an instruction in a clean way
...
llvm-svn: 1376
2001-11-26 18:57:12 +00:00
Chris Lattner
e33afc1d46
Add #includes to enable buiding in Release mode
...
llvm-svn: 1174
2001-11-07 13:49:45 +00:00
Chris Lattner
82c7401f23
Avoid making a broken transformation!
...
llvm-svn: 1115
2001-11-03 21:30:22 +00:00
Chris Lattner
a621bac2a6
Expose the low level DCE mechanism to external users
...
Refactor code to support it
llvm-svn: 1083
2001-11-01 07:00:27 +00:00
Chris Lattner
3b2c78da03
Simplify DCE code a lot
...
llvm-svn: 1079
2001-11-01 05:55:29 +00:00
Chris Lattner
986e273442
Use the correct prototype for malloc and free
...
llvm-svn: 1066
2001-10-31 06:36:23 +00:00
Chris Lattner
91fc057638
Implemented constant propogation of cast instructions
...
llvm-svn: 1064
2001-10-31 05:07:57 +00:00
Chris Lattner
40372ce62d
Convert to new simpler pass itf
...
llvm-svn: 880
2001-10-18 05:27:33 +00:00
Chris Lattner
4429216038
Convert optimizations to the pass infrastructure
...
llvm-svn: 873
2001-10-18 01:32:34 +00:00
Chris Lattner
9bfad5b7b1
Add new Pass infrastructure and some examples
...
llvm-svn: 836
2001-10-15 17:31:51 +00:00
Chris Lattner
4c81efaf8e
Support the invoke instruction
...
llvm-svn: 765
2001-10-13 06:52:41 +00:00
Chris Lattner
08b1dde37e
Commit more code over to new cast style
...
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
ad1b0a1a83
Convert more code to use new style casts
...
Eliminate old style casts from value.h
llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner
4c684cde80
Add more support for new style casts
...
Convert more code to use them
llvm-svn: 695
2001-10-01 18:26:53 +00:00
Chris Lattner
43781f1f96
Add support for new style casts
...
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner
345daca305
Pull predecessor and successor iterators out of the CFG*.h files, and plop them into
...
the BasicBlock class where they should be. pred_begin/pred_end become methods on BasicBlock,
and the cfg namespace isn't used anymore.
llvm-svn: 691
2001-10-01 13:19:53 +00:00
Chris Lattner
9b45b18404
Pull iterators out of CFG.h and CFGdecls and put them in Support directory
...
llvm-svn: 664
2001-09-28 22:56:31 +00:00
Chris Lattner
2fc6c49ee7
ADCE is broken but at least we know why
...
llvm-svn: 656
2001-09-28 00:06:42 +00:00
Chris Lattner
c583ae1a1a
Make ADCE more robust, it still has problems, but it's getting closer
...
llvm-svn: 521
2001-09-09 22:26:47 +00:00
Chris Lattner
e299925703
Types and constants are wierd things in symbol tables now
...
llvm-svn: 457
2001-09-07 16:43:50 +00:00
Chris Lattner
b82abeff92
* Eliminate reference to ConstantPool class
...
* Constants are global objects that are not allocated or freed
llvm-svn: 456
2001-09-07 16:43:22 +00:00
Chris Lattner
4fc1bcadd9
Constants are now global unique objects
...
llvm-svn: 454
2001-09-07 16:42:26 +00:00
Chris Lattner
eaf4551d57
* Eliminate constant pool dependancies:
...
* Eliminate DoRemoveUnusedConstants
llvm-svn: 453
2001-09-07 16:42:08 +00:00
Chris Lattner
6a211421bf
* Supoprt global constants
...
* Remove support for local constant pools
* Eliminate constant pool merging method, which is no longer neccesary
* Disable invalid optimization (todo: fix it)
llvm-svn: 452
2001-09-07 16:41:30 +00:00
Chris Lattner
a4b4e46e90
Enable the elimination of method prototypes that are not referenced
...
llvm-svn: 325
2001-07-28 17:51:49 +00:00
Chris Lattner
ff6c44f04f
Moved inline/llvm/Tools/* to include/llvm/Support/*
...
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner
11f4097f50
Support external methods
...
llvm-svn: 200
2001-07-15 21:43:45 +00:00
Chris Lattner
a969eb234b
Add knowledge about the struct form of the GetElementPtr instruction
...
llvm-svn: 183
2001-07-14 06:11:51 +00:00
Chris Lattner
10ff90d678
Remove dependency on the structure of ValueHolder.
...
llvm-svn: 182
2001-07-14 06:11:26 +00:00
Chris Lattner
80c9d7c165
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
3b66715c67
Implement checking for new instructions
...
llvm-svn: 163
2001-07-08 21:18:49 +00:00
Chris Lattner
acc906f1de
Use the CDG to mark branches alive on demand.
...
llvm-svn: 159
2001-07-08 18:38:36 +00:00
Chris Lattner
7a7ddef47e
Neg instruction removed. Cast instruction implemented.
...
llvm-svn: 156
2001-07-08 04:57:15 +00:00
Chris Lattner
c00392210d
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
6f7587e4d3
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
e28135f621
Update to include right file
...
llvm-svn: 138
2001-07-06 16:32:07 +00:00
Chris Lattner
d4e8817fd9
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
c4e564a84c
Rename DoSparseConditionalConstantProp -> DoSCCP
...
llvm-svn: 117
2001-06-30 06:37:43 +00:00
Chris Lattner
0815f96a2f
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