summaryrefslogtreecommitdiff
path: root/lib/Transforms
Commit message (Collapse)AuthorAge
...
* *** empty log message ***Chris Lattner2002-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3483 91177308-0d34-0410-b5e6-96231b3b80d8
* Add capability of using pointer analysis to LICMChris Lattner2002-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3478 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove long obsolete commentsChris Lattner2002-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3476 91177308-0d34-0410-b5e6-96231b3b80d8
* Instcombine PHI's of the form %PN = phi PN, X into X andChris Lattner2002-08-22
| | | | | | | %PN = phi PN, PN, PN into 0 (because the phi must not be reachable) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3470 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert GCSE pass to use new alias analysis infrastructureChris Lattner2002-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3463 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not generate load/store instructions with indexing.Chris Lattner2002-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3461 91177308-0d34-0410-b5e6-96231b3b80d8
* - Split Dominators.h into Dominators.h & PostDominators.hChris Lattner2002-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3432 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not generate loads/stores with indexingChris Lattner2002-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3422 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous #includesChris Lattner2002-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3421 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not create load/stores with indexesChris Lattner2002-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3420 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an optimization that isn't.Chris Lattner2002-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3419 91177308-0d34-0410-b5e6-96231b3b80d8
* - Do not expose ::ID from any of the analyses anymore.Chris Lattner2002-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3417 91177308-0d34-0410-b5e6-96231b3b80d8
* fixed bug: test/Regression/Linker/2002-08-20-ConstantExpr.llChris Lattner2002-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3412 91177308-0d34-0410-b5e6-96231b3b80d8
* - instcombine (~(a < b)) into (a >= b)Chris Lattner2002-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3406 91177308-0d34-0410-b5e6-96231b3b80d8
* - implemented instcombine of phi (X, X, X) -> XChris Lattner2002-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3397 91177308-0d34-0410-b5e6-96231b3b80d8
* - Made GlobalDCE worklist driven, making it more successful. Now can handleChris Lattner2002-08-18
| | | | | | | cases like: test/Regression/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3381 91177308-0d34-0410-b5e6-96231b3b80d8
* Promote getelementptr instructions to constexprs if we can.Chris Lattner2002-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3368 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle more cases of cast-of-cast in more general forms.Chris Lattner2002-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3347 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement capability to fold this:Chris Lattner2002-08-14
| | | | | | | | | | | | uint %test4(int %A, int %B) { %COND = setlt int %A, %B ; <bool> [#uses=1] %result = cast bool %COND to uint ; <uint> [#uses=1] ret uint %result } into a single cast instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3339 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid creating 'load X, 0' instead of just 'load X'Chris Lattner2002-08-14
| | | | | | | | | This _trivial_ change causes GCSE and LICM to be much more effective at hoisting loads. Before it would not be able to eliminate 'load X' if there was just a dominating 'load X, 0' because the expressions were not identical. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3337 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid inserting an entry block unless we need itChris Lattner2002-08-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3336 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for Not ConstantExpr. This simplifies the unary case to onlyChris Lattner2002-08-14
| | | | | | | have to support the cast instruction, so the function is renamed to getCast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3328 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug introduced in last checkin due to CastInst not being visibleChris Lattner2002-08-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3327 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for NOT instructionChris Lattner2002-08-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3323 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra #includesChris Lattner2002-08-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3322 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for unary operatorsChris Lattner2002-08-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3318 91177308-0d34-0410-b5e6-96231b3b80d8
* - Fix InstCombine pass to not generate or process NOT instructionsChris Lattner2002-08-14
| | | | | | | - Fixed testcases to not use them either. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3315 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for NOT instructionChris Lattner2002-08-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3313 91177308-0d34-0410-b5e6-96231b3b80d8
* - Rename ConstantGenericIntegral -> ConstantIntegralChris Lattner2002-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3300 91177308-0d34-0410-b5e6-96231b3b80d8
* * Factor a bunch of code by using ReplaceInstUsesWithChris Lattner2002-08-12
| | | | | | | * Move isMaxValue, isMinValue, isAllOnesValue to Constants.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3290 91177308-0d34-0410-b5e6-96231b3b80d8
* New functionality for instcombine:Chris Lattner2002-08-09
| | | | | | | | | | | | | | | | | | * New ReplaceInstUsesWith function to factor out tons of common code This needs to be used more in the future still, but it's a good start * New InsertNewInstBefore to allow multi-instruction replacements * Change getMaxValue functions to isAllOnesValue function, which doesn't have to CREATE/lookup a new constant. Also the name is accurate * Add new isMaxValue, isMinValue, isMaxValueMinusOne, isMinValuePlusOne functions: This should be moved to Constant* classes eventually * Implement xor X, ALLONES -> not X * Fold ALL setcc's of booleans away * Handle various SetCC's for integers against values at the end of their ranges, possibly off by one. This implements the setcc-strength-reduce.ll testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3286 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of the "Hello World" Pass.Chris Lattner2002-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3266 91177308-0d34-0410-b5e6-96231b3b80d8
* - Cleaned up the interface to AnalysisUsage to take analysis class namesChris Lattner2002-08-08
| | | | | | | | instead of ::ID's. - Pass::getAnalysis<> now no longer takes an optional argument git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3265 91177308-0d34-0410-b5e6-96231b3b80d8
* - Cleaned up the interface to AnalysisUsage to take analysis class namesChris Lattner2002-08-08
| | | | | | | | instead of ::ID's. - Pass::getAnalysis<> now no longer takes an optional argument git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3264 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous #includesChris Lattner2002-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3262 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate cast instructions: use only GEPs in decomposed sequence.Vikram S. Adve2002-08-03
| | | | | | | | Don't decompose if there are 2 indices with 0 as first index. Compute Changed flag correctly in runOnBasicBlock(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3233 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: test/Regression/Transforms/InstCombine/2002-08-02-CastTest.llChris Lattner2002-08-02
| | | | | | | Implement feature: Cast's can now be converted to bitwise AND expressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3225 91177308-0d34-0410-b5e6-96231b3b80d8
* * Cleanups of instcombineChris Lattner2002-08-02
| | | | | | | | | | - Reenable gep (gep x) -> x - Make instcombine do dead instruction elimination where it's really easy. Now visitors don't have to ensure they aren't not processing dead instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3222 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: test/Regression/Transforms/GCSE/2002-05-21-NoSharedDominator.llChris Lattner2002-08-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3215 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneccesary #inlcudeChris Lattner2002-08-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3200 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the other half of a feature advertised by OperandConvertableToType.Chris Lattner2002-07-31
| | | | | | | This fixes bug: test/Regression/Transforms/LevelRaise/2002-07-31-AssertionFailure.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3193 91177308-0d34-0410-b5e6-96231b3b80d8
* * Indent class into anonymous namespace, filling up the diff with garbageChris Lattner2002-07-30
| | | | | | | | | | * Internalize global variables with initializers * Add new stat to track global variable internalization * Only count functions that were not internal before in internalized function count git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3163 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup ConstantExpr handling:Chris Lattner2002-07-30
| | | | | | | | | | | | | | | * Correctly delete TypeHandles in AsmParser. In addition to not leaking memory, this prevents a bug that could have occurred when a type got resolved that the constexpr was using * Check for errors in the AsmParser instead of hitting assertion failures deep in the code * Simplify the interface to the ConstantExpr class, removing unneccesary parameters to the ::get* methods. * Rename the 'getelementptr' version of ConstantExpr::get to ConstantExpr::getGetElementPtr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3160 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove FIXME's that aren't really needed after all.Chris Lattner2002-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3158 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug with last patch which would occur when a call returned void and weChris Lattner2002-07-30
| | | | | | | attempted to assign it a name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3142 91177308-0d34-0410-b5e6-96231b3b80d8
* * Make sure the resolved function call instructions get the name from theChris Lattner2002-07-30
| | | | | | | | | old call instruction * Implement conversion of return values for calls. This fixes bug: test/Regression/Transforms/FunctionResolve/retmismatch3.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3140 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fix bug: test/Regression/Transforms/ADCE/2002-07-17-AssertionFailure.llChris Lattner2002-07-30
| | | | | | | | | | | | which was caused by us not running the "drop references of dead instructions" code when there were no basic blocks that were dead. We still don't want to do some of the stuff we do if there are dead basic blocks, but we DO want to drop references of dead instructions, so we factor the common code out to a new method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3137 91177308-0d34-0410-b5e6-96231b3b80d8
* Add code to ensure that no PHI nodes are left laying around with theirChris Lattner2002-07-29
| | | | | | | | arguments dropped. This fixes bug: test/Regression/Transforms/ADCE/2002-07-17-PHIAssertion.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3134 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a new RemoveSuccessor functionChris Lattner2002-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3131 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: test/Regression/Transforms/ADCE/2002-07-29-Segfault.llChris Lattner2002-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3129 91177308-0d34-0410-b5e6-96231b3b80d8