aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar
Commit message (Collapse)AuthorAgeFilesLines
* Finegrainify namespacificationChris Lattner2004-01-0911-63/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10725 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve encapsulation in the Loop and LoopInfo classes by eliminating theChris Lattner2004-01-082-11/+8
| | | | | | | | getSubLoops/getTopLevelLoops methods, replacing them with iterator-based accessors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10714 91177308-0d34-0410-b5e6-96231b3b80d8
* More minor non-functional changes. This now computes the exit condition, thoughChris Lattner2003-12-231-15/+52
| | | | | | | it doesn't do anything with it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10590 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't mind me, I'm just refactoring away. This patch makes room for LFTR, butChris Lattner2003-12-221-90/+130
| | | | | | | contains no functionality changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10583 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement IndVarsSimplify/pointer-indvars.ll, transforming pointerChris Lattner2003-12-221-9/+19
| | | | | | | arithmetic into "array subscripts" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10580 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR194Chris Lattner2003-12-221-56/+85
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10573 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ADCE/2003-12-19-MergeReturn.llxChris Lattner2003-12-191-7/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10539 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the wierd "Operands" loop, by traversing basicblocks in reverse orderChris Lattner2003-12-191-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10536 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement LICM/sink_multiple.ll, by sinking all possible instructions in theChris Lattner2003-12-191-20/+55
| | | | | | | loop before hoisting any. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10534 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor code out into the Utils libraryChris Lattner2003-12-191-23/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10530 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverted back to previous revision - this was previously mergedJohn Criswell2003-12-181-8/+15
| | | | | | | according to the CVS log messages. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10517 91177308-0d34-0410-b5e6-96231b3b80d8
* Merged in RELEASE_11.John Criswell2003-12-181-15/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10516 91177308-0d34-0410-b5e6-96231b3b80d8
* When we delete instructions from the loop, make sure to remove them from theChris Lattner2003-12-181-0/+2
| | | | | | | AliasSetTracker as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10507 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR185 & IndVarsSimplify/2003-12-15-Crash.llxChris Lattner2003-12-151-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10473 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor code just a little bit, allowing us to implement ↵Chris Lattner2003-12-141-51/+68
| | | | | | TailCallElim/return_constant.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10467 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not promote volatile alias sets into registersChris Lattner2003-12-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10458 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix LICM/2003-12-11-SinkingToPHI.ll, and quite possibly all of the other ↵Chris Lattner2003-12-111-2/+11
| | | | | | known problems in the universe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10409 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: LICM/sink_multiple_exits.llChris Lattner2003-12-101-1/+1
| | | | | | | Thanks for pointing this out John :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10387 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't allow dead instructions to stop sinking early.Chris Lattner2003-12-101-10/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10386 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: IndVarsSimplify/2003-12-10-RemoveInstrCrash.llxChris Lattner2003-12-101-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10385 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2003-12-101-8/+27
| | | | | | | | Reorder #includes Implement: IndVarsSimplify/2003-12-10-IndVarDeadCode.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10376 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify codeChris Lattner2003-12-101-6/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10371 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid performing two identical lookups when one will sufficeChris Lattner2003-12-101-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10370 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LICM itself a bit more efficient, and make the generated code more ↵Chris Lattner2003-12-101-21/+26
| | | | | | efficient too: don't insert a store in every exit block, because a particular block may be exited to more than once by a loop git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10369 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement instruction sinking out of loops. This still can do a little bitChris Lattner2003-12-101-61/+246
| | | | | | | | better job, but this is the majority of the work. This implements LICM/sink*.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10358 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor code a little bit, eliminating the gratuitous InstVisitor, whichChris Lattner2003-12-091-41/+43
| | | | | | | | should make subsequent changes simpler. This also allows us to hoist vaarg and vanext instructions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10342 91177308-0d34-0410-b5e6-96231b3b80d8
* Fine grainify namespacificationChris Lattner2003-12-091-36/+48
| | | | | | | | Code cleanups Make LICM::SafeToHoist marginally more efficient git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10341 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement: TailCallElim/accum_recursion_constant_arg.llChris Lattner2003-12-081-6/+60
| | | | | | | Also make sure to clean up any PHI nodes that are inserted which are pointless. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10333 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement: test/Regression/Transforms/TailCallElim/accum_recursion.llChris Lattner2003-12-081-12/+122
| | | | | | | | | We now insert accumulator variables as necessary to eliminate tail recursion more aggressively. This is still fairly limited, but allows us to transform fib/factorial, and other functions into nice happy loops. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10332 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup and restructure the code to make it easier to read and maintain.Chris Lattner2003-12-081-53/+126
| | | | | | | | | | | | | | | The only functionality change is that we now implement: Regression/Transforms/TailCallElim/intervening-inst.ll Which is really kinda pointless, because it means that trivially dead code does not interfere with -tce, but trivially dead code probably wouldn't be around anytime when this pass is run anyway. The point of including this change it to support other more aggressive transformations when we have the analysis capabilities to do so. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10312 91177308-0d34-0410-b5e6-96231b3b80d8
* * Finegrainify namespacificationChris Lattner2003-12-071-4/+17
| | | | | | | * Transform: free <ty>* (cast <ty2>* X to <ty>*) into free <ty2>* X git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10303 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2003-12-021-6/+3
| | | | | | | Fix regressions ScalarRepl/basictest.ll & arraytest.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10287 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use index type to determine what it is indexing into!Chris Lattner2003-11-251-26/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10226 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not crash when deleing a region with a dead invoke instructionChris Lattner2003-11-221-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10161 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2003-11-221-14/+16
| | | | | | | The module stripping pass should not strip symbols on external globals git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10157 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanups and simplificationsChris Lattner2003-11-212-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10127 91177308-0d34-0410-b5e6-96231b3b80d8
* Start using the nicer terminator auto-insertion APIChris Lattner2003-11-202-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10111 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR116Chris Lattner2003-11-161-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10032 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement feature: InstCombine/2003-11-13-ConstExprCastCall.llChris Lattner2003-11-131-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9981 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-1118-11/+82
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to new critical edge interfaceChris Lattner2003-11-101-6/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9853 91177308-0d34-0410-b5e6-96231b3b80d8
* Declare FunctionPasses as such so that they can be used in FunctionPassManager.Misha Brukman2003-11-073-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9768 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix flawed logic that was breaking several SPEC benchmarks, including gzip ↵Chris Lattner2003-11-051-3/+3
| | | | | | and crafty. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9731 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug with previous implementation:Chris Lattner2003-11-051-4/+11
| | | | | | | | | | - // ~(c-X) == X-(c-1) == X+(-c+1) + // ~(c-X) == X-c-1 == X+(-c-1) Implement: C - ~X == X + (1+C) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9715 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup, plus implement InstCombine/xor.ll:test17Chris Lattner2003-11-041-3/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9711 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement InstCombine/xor.ll:test(15|16)Chris Lattner2003-11-041-1/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9708 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement InstCombine/cast-set.ll:test6[a]. This improves code generated forChris Lattner2003-11-031-6/+57
| | | | | | | a hot function in em3d git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9673 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement InstCombine/cast-set.ll: test1, test2, test7Chris Lattner2003-11-031-15/+41
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9670 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug with zero sized castsChris Lattner2003-11-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9667 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug in previous checkinChris Lattner2003-11-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9656 91177308-0d34-0410-b5e6-96231b3b80d8