aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Make functions that preserve the CFG not invalidate analyses that only dependChris Lattner2002-05-061-1/+28
| | | | | | | on the CFG of a function git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2506 91177308-0d34-0410-b5e6-96231b3b80d8
* Only do masking for unsigned values!Chris Lattner2002-05-061-8/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2504 91177308-0d34-0410-b5e6-96231b3b80d8
* * Eliminate dead code that should have been removed in last revisionChris Lattner2002-05-061-146/+50
| | | | | | | | | | * Convert main constant propogation pass to be worklist driven instead of iterative. * -constprop pass no longer "constant propogates" terminator instructions - CFG is now preserved! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2502 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle X = phi Y --> X = YChris Lattner2002-05-061-0/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2501 91177308-0d34-0410-b5e6-96231b3b80d8
* Move a bunch of code to a .cpp file, don't #include Instruction.hChris Lattner2002-05-062-86/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2499 91177308-0d34-0410-b5e6-96231b3b80d8
* Move code out of header fileChris Lattner2002-05-061-0/+81
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2498 91177308-0d34-0410-b5e6-96231b3b80d8
* * Use simplified interface to constant propogation stuff.Chris Lattner2002-05-061-35/+8
| | | | | | | | | * Remove dead PHI case (which could not work due to getNumOperands rather than getNumIncomingValues. This really belongs in InstCombine, anyway so we'll move it there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2497 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #include removed from ConstantHandling.hChris Lattner2002-05-061-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2496 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up ADCE by removing extraneous wrapper classChris Lattner2002-05-061-43/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2494 91177308-0d34-0410-b5e6-96231b3b80d8
* Combine not (not X) -> XChris Lattner2002-05-061-1/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2493 91177308-0d34-0410-b5e6-96231b3b80d8
* Support more cases...Chris Lattner2002-05-061-16/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2490 91177308-0d34-0410-b5e6-96231b3b80d8
* Change usage of isPointerType to use isaChris Lattner2002-05-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2487 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace all usages of Type::isPointerType with isa<PointerType>Chris Lattner2002-05-0613-65/+53
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2486 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement getPrimitiveSize()Chris Lattner2002-05-061-2/+14
| | | | | | | don't use isPointerType() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2485 91177308-0d34-0410-b5e6-96231b3b80d8
* Add many more instruction combination simplificationsChris Lattner2002-05-061-10/+188
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2484 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead codeChris Lattner2002-05-061-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2473 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge blocks like this:Chris Lattner2002-05-061-26/+39
| | | | | | | | | | | void "test3"(bool %T) { br bool %T, label %BB1, label %BB1 BB1: ret void } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2472 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement constant propogation of shift instructionsChris Lattner2002-05-064-7/+86
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2471 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement constant propogation of shiftsChris Lattner2002-05-061-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2470 91177308-0d34-0410-b5e6-96231b3b80d8
* Print functions with curly braces instead of begin/endChris Lattner2002-05-061-9/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2469 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement two iterator remove methodChris Lattner2002-05-061-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2467 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement remainderChris Lattner2002-05-031-9/+46
| | | | | | | Fix implementation of Not git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2464 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement remainderChris Lattner2002-05-032-22/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2463 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: test/Regression/Transforms/SCCP/2002-05-03-NotOperator.llChris Lattner2002-05-031-12/+26
| | | | | | | by using the ~ operator instead of ! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2458 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the NOT operator.Chris Lattner2002-05-031-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2455 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow open/closing curly braces instead of begin/end to define the body of a ↵Chris Lattner2002-05-032-3/+7
| | | | | | function git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2451 91177308-0d34-0410-b5e6-96231b3b80d8
* Ok, really it only takes me 3 times to get this right!Chris Lattner2002-05-021-1/+1
| | | | | | | Now use #if 0 instead of #ifdef 0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2448 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, disable debugging code all the way. :)Chris Lattner2002-05-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2447 91177308-0d34-0410-b5e6-96231b3b80d8
* * Finish the implementation of isEdgeFeasible this fixes bug:Chris Lattner2002-05-021-57/+77
| | | | | | | | | | test/Regression/Transforms/SCCP/2002-05-02-EdgeFailure.ll * SCCP now preserves the CFG: It leaves conditional branches the way they are in the program, not simplifying them. A seperate pass should eliminate the potentially dead basic blocks and edges in the CFG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2446 91177308-0d34-0410-b5e6-96231b3b80d8
* * Enable SCCP debugging to be turned on with a simple change of #defineChris Lattner2002-05-021-32/+52
| | | | | | | | | | | | | | * Change worklist to a set so that duplicates cannot happen * Add support for the invoke instruction * Avoid marking store and free instructions as overdefined, since they cannot produce a value anyway. * Inline the OperandChangedState implementation * Add isEdgeFeasible in preparation to fix a bug. Right now it behaves exactly as before. * Remove obsolete comment about constant pools git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2445 91177308-0d34-0410-b5e6-96231b3b80d8
* * Simplify the code by not bothering to name the folded constantChris Lattner2002-05-021-10/+7
| | | | | | | | | * Do not skip the instruction immediately after a folded instruction. This was causing the testcase failure: test/Regression/Transforms/SCCP/2002-05-02-MissSecondInst.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2443 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement cast operations on booleans to allow casting bools to ints, f.e.Chris Lattner2002-05-021-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2437 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fix a bug (test/Regression/Assembler/2002-05-02-InvalidForwardRef.ll)Chris Lattner2002-05-021-2/+3
| | | | | | | | introduced in the 1.66 revision of this file. * Convert a hard coded constant to a symbolic value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2436 91177308-0d34-0410-b5e6-96231b3b80d8
* The implementation keyword is no longer neccesaryChris Lattner2002-05-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2434 91177308-0d34-0410-b5e6-96231b3b80d8
* The "implementation" is now allowed but not required by the parser. All typeChris Lattner2002-05-021-30/+32
| | | | | | | | definitions must still occur before function bodies, but the wierd keyword is no longer neccesary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2433 91177308-0d34-0410-b5e6-96231b3b80d8
* ExprTypeConvert will already do this transformation, no need to specializeChris Lattner2002-05-021-21/+0
| | | | | | | it here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2431 91177308-0d34-0410-b5e6-96231b3b80d8
* Be a little more efficient, do not generate loads and stores with indices in ↵Chris Lattner2002-05-021-25/+37
| | | | | | them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2430 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: test/Regression/Transforms/LevelRaise/2002-05-02-BadCastElimination.llChris Lattner2002-05-021-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2429 91177308-0d34-0410-b5e6-96231b3b80d8
* * Add ability to eliminate a bunch of different cascading cast variationsChris Lattner2002-05-021-2/+60
| | | | | | | * Allow elimination of getelementptr X, uint 0 (which is a noop) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2428 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed bug: ↵Chris Lattner2002-05-011-0/+3
| | | | | | test/Regression/Transforms/Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2423 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneccesary passChris Lattner2002-04-301-86/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2420 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix problem where subpasses would invalidate all analyses outstandingChris Lattner2002-04-301-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2418 91177308-0d34-0410-b5e6-96231b3b80d8
* Add folding rules for mul X, 0 and mul X, 2Chris Lattner2002-04-291-3/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2417 91177308-0d34-0410-b5e6-96231b3b80d8
* Significantly clean up SCCP pass. Now the two classes are merged and inChris Lattner2002-04-291-44/+37
| | | | | | | an anonymous namespace where they belong. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2415 91177308-0d34-0410-b5e6-96231b3b80d8
* Range insertion now returns an iteratorChris Lattner2002-04-291-5/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2414 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the range insert operation return an iterator, even though the STLChris Lattner2002-04-291-3/+11
| | | | | | | range insert doesn't git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2413 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused files: This is the old induction varaible cannonicalizationChris Lattner2002-04-291-408/+0
| | | | | | | pass built on top of interval analysis git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2411 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for problem when allocating something like this:Chris Lattner2002-04-291-7/+3
| | | | | | | malloc(100-i); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2409 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix #include broken by iMemory.h not including DerivedTypes.hChris Lattner2002-04-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2407 91177308-0d34-0410-b5e6-96231b3b80d8
* Add neccesary #includeChris Lattner2002-04-292-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2406 91177308-0d34-0410-b5e6-96231b3b80d8