aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* minor long double related changesDale Johannesen2007-09-281-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42439 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't do SRA for unions with long double fields.Dale Johannesen2007-09-281-0/+6
| | | | | | | | Fixes a SWB crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42422 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle multiple induction variables.Devang Patel2007-09-251-7/+14
| | | | | | | This fixes PR714. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42309 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not reserve DOM check for GetElementPtrInst.Devang Patel2007-09-251-21/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42306 91177308-0d34-0410-b5e6-96231b3b80d8
* doh.. Devang Patel2007-09-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42300 91177308-0d34-0410-b5e6-96231b3b80d8
* Add transformation to update loop interation space. Now,Devang Patel2007-09-251-7/+148
| | | | | | | | | | | | | | | | | for (i=A; i<N; i++) { if (i < X && i > Y) do_something(); } is transformed into U=min(N,X); L=max(A,Y); for (i=L;i<U;i++) do_somethihg(); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42299 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not promote null values because it may be unsafe to do so.Devang Patel2007-09-241-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42270 91177308-0d34-0410-b5e6-96231b3b80d8
* explicit keywords.Dan Gohman2007-09-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42262 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1692Devang Patel2007-09-211-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42209 91177308-0d34-0410-b5e6-96231b3b80d8
* Add partial caching of non-local memory dependence queries. This provides a ↵Owen Anderson2007-09-211-1/+1
| | | | | | | | | modest speedup for GVN. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42185 91177308-0d34-0410-b5e6-96231b3b80d8
* Update aux. info associated with an instruction before erasing instruction.Devang Patel2007-09-201-12/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42180 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't increment invalid iterator.Devang Patel2007-09-201-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42178 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix optimization. %x = sub %x, %y does not imply that %y is zero.Nick Lewycky2007-09-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42157 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid unsafe promotion.Devang Patel2007-09-191-9/+41
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42149 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve comment.Duncan Sands2007-09-191-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42132 91177308-0d34-0410-b5e6-96231b3b80d8
* A global variable with external weak linkage can be null, whileDuncan Sands2007-09-191-2/+6
| | | | | | | an alias could alias such a global variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42130 91177308-0d34-0410-b5e6-96231b3b80d8
* Relax loop ExitCondition predicate restriction.Devang Patel2007-09-191-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42122 91177308-0d34-0410-b5e6-96231b3b80d8
* Filter loops where split condition's false branch is not empty. For exampleDevang Patel2007-09-191-0/+4
| | | | | | | | | | | | for (int i = 0; i < N; ++i) { if (i == somevalue) dosomething(); else dosomethingelse(); } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42121 91177308-0d34-0410-b5e6-96231b3b80d8
* Bail out early, before modifying anything.Devang Patel2007-09-191-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42120 91177308-0d34-0410-b5e6-96231b3b80d8
* Work is incomplete. Loop is not modified at all right now.Devang Patel2007-09-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42119 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1657Devang Patel2007-09-181-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42075 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not eliminate loop when it is invalid to do so. For example,Devang Patel2007-09-171-14/+35
| | | | | | | | | | | | | | | | for(int i = 0; i < N; i++) { if ( i == XYZ) { A; else B; } C; D; } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42058 91177308-0d34-0410-b5e6-96231b3b80d8
* Skeleton for transformations to truncate loop's iteration space.Devang Patel2007-09-171-2/+198
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42054 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Devang Patel2007-09-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42048 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfoChris Lattner2007-09-173-9/+19
| | | | | | | | Add a new DenseMapInfo::isEqual method to allow clients to redefine the equality predicate used when probing the hash table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42042 91177308-0d34-0410-b5e6-96231b3b80d8
* Instcombine x-((x/y)*y) into a remainder operator.Dan Gohman2007-09-171-1/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42035 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor the trampoline transformation into a subroutine.Duncan Sands2007-09-171-137/+148
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42021 91177308-0d34-0410-b5e6-96231b3b80d8
* Be more careful when constant-folding PHI nodes.Owen Anderson2007-09-161-1/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41998 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove RLE. It is subsumed by GVN.Owen Anderson2007-09-141-135/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41968 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the assumption that FP's are either float orDale Johannesen2007-09-141-3/+6
| | | | | | | | | | | | | | | double from some of the many places in the optimizers it appears, and do something reasonable with x86 long double. Make APInt::dump() public, remove newline, use it to dump ConstantSDNode's. Allow APFloats in FoldingSet. Expand X86 backend handling of long doubles (conversions to/from int, mostly). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41967 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a logic error in ValueIsOnlyUsedLocallyOrStoredToOneGlobal that caused Chris Lattner2007-09-141-4/+4
| | | | | | | | miscompilation of 188.ammp. Reject select and bitcast in ValueIsOnlyUsedLocallyOrStoredToOneGlobal because RewriteHeapSROALoadUser can't handle it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41950 91177308-0d34-0410-b5e6-96231b3b80d8
* silence a bogus gcc warning.Chris Lattner2007-09-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41949 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporary reverting r41817Bill Wendling2007-09-141-15/+5
| | | | | | | | | (http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070910/053370.html). It's causing SPASS to fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41938 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach GlobalLoadUsesSimpleEnoughForHeapSRA and the SROA rewriter how to handleChris Lattner2007-09-131-14/+62
| | | | | | | | a limited form of PHI nodes. This finally fixes PR1639, speeding 179.art up from 7.84s to 3.13s on PPC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41933 91177308-0d34-0410-b5e6-96231b3b80d8
* be tolerant of PHI nodes when rewriting heap SROA code. This is a stepChris Lattner2007-09-131-26/+50
| | | | | | | along the way of PR1639 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41930 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor some code, no functionality change. On the path to PR1639Chris Lattner2007-09-131-50/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41929 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ValueIsOnlyUsedLocallyOrStoredToOneGlobal smart enough to see throughChris Lattner2007-09-131-5/+16
| | | | | | | bitcasts and phis. This is a step to fixing PR1639. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41928 91177308-0d34-0410-b5e6-96231b3b80d8
* Make AllUsesOfLoadedValueWillTrapIfNull strong enough to see through PHIChris Lattner2007-09-131-6/+15
| | | | | | | nodes. This is the first step of the fix for PR1639. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41927 91177308-0d34-0410-b5e6-96231b3b80d8
* Change llvm.gcroot to not init the root to null at runtime, this preventsChris Lattner2007-09-121-4/+1
| | | | | | | using it for live-in values etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41879 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn calls to trampolines into calls to the underlyingDuncan Sands2007-09-111-0/+138
| | | | | | | nested function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41844 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid negative logic.Devang Patel2007-09-111-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41829 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor code into a separate method.Devang Patel2007-09-111-28/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41826 91177308-0d34-0410-b5e6-96231b3b80d8
* Clear split info object.Devang Patel2007-09-111-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41823 91177308-0d34-0410-b5e6-96231b3b80d8
* Split condition does not have to be ICmpInst in all cases.Devang Patel2007-09-111-5/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41822 91177308-0d34-0410-b5e6-96231b3b80d8
* Check all terminators inside loop.Devang Patel2007-09-101-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41821 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some dead code, this is handled by constant folding.Chris Lattner2007-09-101-8/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41819 91177308-0d34-0410-b5e6-96231b3b80d8
* Swap exit condition operands if it works.Devang Patel2007-09-101-5/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41817 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent tailcallelim from breaking "recursive" calls to builtins.Chris Lattner2007-09-101-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41804 91177308-0d34-0410-b5e6-96231b3b80d8
* Filter exit conditions which are not yet handled.Devang Patel2007-09-101-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41800 91177308-0d34-0410-b5e6-96231b3b80d8
* Require SCEV before LCSSA.Devang Patel2007-09-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41798 91177308-0d34-0410-b5e6-96231b3b80d8