aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar
Commit message (Collapse)AuthorAgeFilesLines
* Disable tail duplication in a case that breaks on Olden/tspChris Lattner2004-03-011-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12021 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR255: [tailduplication] Single basic block loops are very rareChris Lattner2004-02-291-1/+2
| | | | | | | | Note that this is a band-aid put over a band-aid. This just undisables tail duplication in on very specific case that it seems to work in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11989 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename AddUsesToWorkList -> AddUsersToWorkList, as that is what it does.Chris Lattner2004-02-281-19/+54
| | | | | | | | Create a new AddUsesToWorkList method optimize memmove/set/cpy of zero bytes to a noop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11941 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn 'free null' into nothingChris Lattner2004-02-281-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11940 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement test/Regression/Transforms/InstCombine/canonicalize_branch.llChris Lattner2004-02-271-1/+23
| | | | | | | | This is a really minor thing, but might help out the 'switch statement induction' code in simplifycfg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11900 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a faulty optimization on FP valuesChris Lattner2004-02-241-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11801 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate much more efficient code in programs like pifftChris Lattner2004-02-231-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11775 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a small typeo in my checkin last night that broke vortex and other ↵Chris Lattner2004-02-231-1/+1
| | | | | | programs :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11774 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix InstCombine/2004-02-23-ShiftShiftOverflow.llChris Lattner2004-02-231-3/+10
| | | | | | | Also, turn 'shr int %X, 1234' into 'shr int %X, 31' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11768 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement cast.ll::test14/15Chris Lattner2004-02-231-0/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11742 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor some code. In the mul - setcc folding case, we really care aboutChris Lattner2004-02-231-32/+63
| | | | | | | whether this is the sign bit or not, so check unsigned comparisons as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11740 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement mul.ll:test11Chris Lattner2004-02-231-6/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11737 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement "strength reduction" of X <= C and X >= CChris Lattner2004-02-231-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11735 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement InstCombine/mul.ll:test10, which is a case that occurs when dealingChris Lattner2004-02-231-0/+40
| | | | | | | with "predication" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11734 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement Transforms/InstCombine/cast.ll:test13, a case which occurs in aChris Lattner2004-02-222-4/+35
| | | | | | | hot 164.gzip loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11702 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold PHI nodes of constants which are only used by a single cast. This ↵Chris Lattner2004-02-161-0/+29
| | | | | | | | | implements phi.ll:test4 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11494 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach LLVM to unravel the "swap idiom". This implements:Chris Lattner2004-02-161-2/+13
| | | | | | | Regression/Transforms/InstCombine/xor.ll:test20 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11492 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement Transforms/InstCombine/xor.ll:test19Chris Lattner2004-02-161-2/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11490 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjustments to support the new ConstantAggregateZero classChris Lattner2004-02-152-5/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11474 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove obsolete comment. Unreachable blocks will automatically be left at theChris Lattner2004-02-111-2/+0
| | | | | | | end of the function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11313 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an _embarassingly simple_ implementation of basic block layout. This isChris Lattner2004-02-111-0/+141
| | | | | | | | | more of a testcase for profiling information than anything that should reasonably be used, but it's a starting point. When I have more time I will whip this into better shape. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11311 91177308-0d34-0410-b5e6-96231b3b80d8
* rename the "exceptional" destination of an invoke instruction to the ↵Chris Lattner2004-02-081-2/+2
| | | | | | 'unwind' dest git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11202 91177308-0d34-0410-b5e6-96231b3b80d8
* Add debug outputChris Lattner2004-02-051-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11139 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to the new BasicBlock ctor, which requires a function parameterChris Lattner2004-02-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11114 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable (x - (y - z)) => (x + (z - y)) optimization for floating point.Chris Lattner2004-02-021-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11083 91177308-0d34-0410-b5e6-96231b3b80d8
* Update commentChris Lattner2004-02-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11082 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable tail duplication in any "hard" cases, where it might break SSA form.Chris Lattner2004-02-011-1/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11052 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the count of the number of instructions removedChris Lattner2004-02-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11049 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix InstCombine/2004-01-13-InstCombineInvokePHI.ll, which also fixes lotsChris Lattner2004-01-141-4/+20
| | | | | | | of C++ programs in Shootout-C++, including lists1 and moments, etc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10845 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug in previous checkinChris Lattner2004-01-121-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10798 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate use of ConstantHandling and ConstantExpr::getShift interfacesChris Lattner2004-01-121-39/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10796 91177308-0d34-0410-b5e6-96231b3b80d8
* Add header file I accidentally removed in teh shuffleChris Lattner2004-01-121-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10795 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove use of the ConstantHandling interfacesChris Lattner2004-01-121-15/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10793 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use ConstantExpr::getShift anymoreChris Lattner2004-01-121-23/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10791 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded #includeChris Lattner2004-01-121-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10788 91177308-0d34-0410-b5e6-96231b3b80d8
* Use constantexprs for casts. Eliminate use of the ConstantHandling interfacesChris Lattner2004-01-121-11/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10779 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix fairly severe bug in my last checking where we treated all unfoldableChris Lattner2004-01-121-3/+12
| | | | | | | | | constants as being "true" when evaluating branches. This was introduced because we now create constantexprs for the constants instead of failing the fold. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10778 91177308-0d34-0410-b5e6-96231b3b80d8
* * Implement minor performance optimization for the getelementptr caseChris Lattner2004-01-121-3/+69
| | | | | | | | | * Implement SCCP of load instructions, implementing Transforms/SCCP/loadtest.ll This allows us to fold expressions like "foo"[2], even if the pointer is only a conditional constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10767 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not hack on volatile loads. I'm not sure what the point of a volatile loadChris Lattner2004-01-121-0/+2
| | | | | | | from constant memory is, but lets not take chances. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10765 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement SCCP/phitest.llChris Lattner2004-01-121-14/+115
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10763 91177308-0d34-0410-b5e6-96231b3b80d8
* Update obsolete commentsChris Lattner2004-01-101-6/+9
| | | | | | | | | Fix iterator invalidation problems which was causing -mstrip to miss some entries, and read free'd memory. This shrinks the symbol table of 254.gap from 333 to 284 bytes! :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10751 91177308-0d34-0410-b5e6-96231b3b80d8
* 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