Commit Graph

319 Commits

Author SHA1 Message Date
Chris Lattner 48a44f7e23 * Add ability to eliminate a bunch of different cascading cast variations
* Allow elimination of getelementptr X, uint 0 (which is a noop)

llvm-svn: 2428
2002-05-02 17:06:02 +00:00
Chris Lattner 31ba129cbe Add folding rules for mul X, 0 and mul X, 2
llvm-svn: 2417
2002-04-29 22:24:47 +00:00
Chris Lattner d5a847057b Eliminate duplicate or unneccesary #include's
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner 37104aace8 Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.

llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner f12cc842b3 Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
llvm-svn: 2386
2002-04-28 21:27:06 +00:00
Chris Lattner c8e665431b * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well

llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner 2716b5e524 Change Constant::getNullConstant to Constant::getNullValue
llvm-svn: 2323
2002-04-27 02:25:14 +00:00
Chris Lattner 260ab20422 Significantly rework InstructionCombining to work better and to be cleaner.
We now use an InstVisitor to delegate to different cases that we are
interested in handling.  We also fix the FIXME's by adding users to the
worklist when appropriate.

llvm-svn: 2292
2002-04-18 17:39:14 +00:00
Chris Lattner f40379e403 Store instructions always return void, so they never get a name
llvm-svn: 2283
2002-04-18 14:43:54 +00:00
Chris Lattner 3a60d04722 Eliminate cast of same type instructions.
llvm-svn: 2251
2002-04-15 19:45:29 +00:00
Chris Lattner 65b529fe6d ConstantHandling moved into VMCore library
llvm-svn: 2165
2002-04-08 20:18:09 +00:00
Chris Lattner 62b7fd136e Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.

llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner bee86626e1 Fix bug: test/Regression/Other/2002-03-11-InstCombineHang.ll
llvm-svn: 1864
2002-03-11 23:28:45 +00:00
Chris Lattner 04805fa29c Change over to use new style pass mechanism, now passes only expose small
creation functions in their public header file, unless they can help it.

llvm-svn: 1816
2002-02-26 21:46:54 +00:00
Chris Lattner 83d485b310 * Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
  InstrTypes.h anymore

llvm-svn: 1750
2002-02-12 22:39:50 +00:00
Chris Lattner 60a6591d83 Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h

llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner ee965abc36 Move stuff out of the Optimizations directories into the appropriate Transforms
directories.  Eliminate the opt namespace.

llvm-svn: 1520
2002-01-21 23:17:48 +00:00
Chris Lattner 7f74a56e24 Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner ca081257e5 initial checkin
llvm-svn: 1480
2001-12-14 16:52:21 +00:00