Commit Graph

403924 Commits

Author SHA1 Message Date
Chris Lattner 7edbdd4485 Update documentation a bit, correct #include guard
llvm-svn: 127
2001-07-03 05:35:23 +00:00
Chris Lattner e17733d2ee Add note about tool idea. Change command line of note to be more specific
llvm-svn: 126
2001-07-03 05:35:04 +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 6dccb6576c Enable printing of dominator related information.
Theis will eventually be moved!

llvm-svn: 123
2001-07-02 05:45:30 +00:00
Chris Lattner 12393e5c5a Add new anaysis routines for building dominator related information
llvm-svn: 122
2001-07-02 05:45:17 +00:00
Chris Lattner b44c6a4b47 Addition of 'deleter' function.
llvm-svn: 121
2001-07-02 01:09:41 +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 57f61a32b0 Include ADCE pass, rename include/Opt directory to llvm/Optimizations
Optimizations now in opt namespace.
Rename SCCP pass to DoSCCP

llvm-svn: 118
2001-06-30 06:38:31 +00:00
Chris Lattner 1960b3c6d2 Rename DoSparseConditionalConstantProp -> DoSCCP
llvm-svn: 117
2001-06-30 06:37:43 +00:00
Chris Lattner e758b67f5c Add note
llvm-svn: 116
2001-06-30 06:37:33 +00:00
Chris Lattner 9dd7120a2a Add prototypes for ADCE pass
llvm-svn: 115
2001-06-30 06:37:16 +00:00
Chris Lattner b0810f37d3 Rename DoSparseConditionalConstantProp to DoSCCP
llvm-svn: 114
2001-06-30 06:37:01 +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 6f70fda2f0 The ConstRules class got moved to the opt namespace
llvm-svn: 110
2001-06-30 04:35:01 +00:00
Chris Lattner a6e2316d03 Add a reduceApply method
llvm-svn: 109
2001-06-30 04:34:42 +00:00
Chris Lattner 9e497a01f7 Split AllOpts.h into lots of little .h files.
llvm-svn: 108
2001-06-30 04:34:07 +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 96bb2fb5a2 Added prototype for ConstantFoldTerminator
llvm-svn: 105
2001-06-29 23:56:00 +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 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