aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* use ArgOperand API (one more hunk I could split)Gabor Greif2010-06-251-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106825 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand API (some hunks I could split)Gabor Greif2010-06-252-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106824 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand API; tighten type of handleFreeWithNonTrivialDependency to be ↵Gabor Greif2010-06-251-5/+7
| | | | | | able to use isFreeCall whithout a cast or new overload git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106823 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an exports file for the Hello example plugin.Dan Gohman2010-06-242-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106768 91177308-0d34-0410-b5e6-96231b3b80d8
* A few minor micro-optimizations.Dan Gohman2010-06-241-5/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106764 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach getExactSDiv to evaluate x/1 to x up front, as it's a commonDan Gohman2010-06-241-8/+16
| | | | | | | | enough special case, and it theoretically allows more folding because it works even when x is unanalyzable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106763 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix copy+pasto issues in isMulSExtable.Dan Gohman2010-06-241-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106759 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand APIGabor Greif2010-06-241-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106752 91177308-0d34-0410-b5e6-96231b3b80d8
* use (even more, still) ArgOperand APIGabor Greif2010-06-241-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106750 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand API and CallSite for arg range; add necessary casts and ↵Gabor Greif2010-06-241-11/+14
| | | | | | perform some cosmetics git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106747 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand API and CallSite for arg rangeGabor Greif2010-06-241-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106745 91177308-0d34-0410-b5e6-96231b3b80d8
* use (even more) ArgOperand APIGabor Greif2010-06-241-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106744 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand APIGabor Greif2010-06-241-6/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106743 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand APIGabor Greif2010-06-241-31/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106740 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand APIGabor Greif2010-06-241-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106737 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand API, also tighten the type of visitFree to make this work out ↵Gabor Greif2010-06-242-7/+7
| | | | | | smoothly git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106736 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand API; introduce downcasted pointers into scope to facilitate thisGabor Greif2010-06-241-7/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106734 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand APIGabor Greif2010-06-241-75/+75
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106731 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand APIGabor Greif2010-06-241-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106730 91177308-0d34-0410-b5e6-96231b3b80d8
* use callsite to obtain all argumentsGabor Greif2010-06-241-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106729 91177308-0d34-0410-b5e6-96231b3b80d8
* use callsite to obtain all argumentsGabor Greif2010-06-241-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106728 91177308-0d34-0410-b5e6-96231b3b80d8
* use getNumArgOperandsGabor Greif2010-06-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106709 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand APIGabor Greif2010-06-243-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106707 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ValueMap instead of DenseMap.Devang Patel2010-06-248-46/+45
| | | | | | | The ValueMapper used by various cloning utility maps MDNodes also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106706 91177308-0d34-0410-b5e6-96231b3b80d8
* Use available typedef for " DenseMap<const Value*, Value*>".Devang Patel2010-06-242-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106699 91177308-0d34-0410-b5e6-96231b3b80d8
* Cosmetic change.Devang Patel2010-06-236-102/+102
| | | | | | | Do not use "ValueMap" as a name for a local variable or an argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106698 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 106592 for now. It causes clang-selfhost build failure.Devang Patel2010-06-221-34/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106598 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix OptimizeMax to handle an odd case where one of the max operandsDan Gohman2010-06-221-1/+4
| | | | | | | is another max which folds. This fixes PR7454. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106594 91177308-0d34-0410-b5e6-96231b3b80d8
* If a metadata operand is seeded in value map and the metadata should also be ↵Devang Patel2010-06-221-13/+34
| | | | | | | | | | | | | seeded in value map. This is not limited to function local metadata. Failure to seed metdata in such cases causes troubles when in a cloned module, metadata from a new module refers to values in old module. Usually this results in mysterious bugpoint crashes. For example, Checking to see if we can delete global inits: Unknown constant! UNREACHABLE executed at /d/g/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:904! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106592 91177308-0d34-0410-b5e6-96231b3b80d8
* While cloning a module, clone metadata attached with instructions.Devang Patel2010-06-221-1/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106591 91177308-0d34-0410-b5e6-96231b3b80d8
* Clone named metadata while cloning a module.Devang Patel2010-06-221-0/+11
| | | | | | | Reapply Bob's patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106560 91177308-0d34-0410-b5e6-96231b3b80d8
* Use pre-increment instead of post-increment when the result is not used.Dan Gohman2010-06-2212-48/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106542 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 106528. It is causing self host failures.Devang Patel2010-06-221-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106529 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not rely on DenseMap slot which can be easily invalidated when DenseMap ↵Devang Patel2010-06-221-7/+5
| | | | | | grows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106528 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert my change to clone named metadata. Buildbots are complaining.Bob Wilson2010-06-221-11/+0
| | | | | | | | --- Reverse-merging r106508 into '.': U lib/Transforms/Utils/CloneModule.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106521 91177308-0d34-0410-b5e6-96231b3b80d8
* Include named metadata when cloning a module.Bob Wilson2010-06-221-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106508 91177308-0d34-0410-b5e6-96231b3b80d8
* Use A.append(...) instead of A.insert(A.end(), ...) when A is aDan Gohman2010-06-212-10/+8
| | | | | | | SmallVector, and other SmallVector simplifications. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106452 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a TODO comment.Dan Gohman2010-06-191-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106397 91177308-0d34-0410-b5e6-96231b3b80d8
* Include the use kind along with the expression in the key of theDan Gohman2010-06-191-2/+28
| | | | | | | | | | | | | use sharing map. The reconcileNewOffset logic already forces a separate use if the kinds differ, so incorporating the kind in the key means we can track more sharing opportunities. More sharing means fewer total uses to track, which means smaller problem sizes, which means the conservative throttles don't kick in as often. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106396 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't include things in anonymous namespaces that don't need it.Dan Gohman2010-06-191-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106395 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable indvars on loops when LoopSimplify form is not available.Dan Gohman2010-06-181-0/+11
| | | | | | | This fixes PR7333. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106267 91177308-0d34-0410-b5e6-96231b3b80d8
* remove trailing whitespaceJim Grosbach2010-06-161-11/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106164 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that simplify libcalls does not replace a call with one callingRafael Espindola2010-06-161-0/+5
| | | | | | convention with a new call with a different calling convention. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106134 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify-libcalls: fold strncmp(x, y, 1) -> memcmp(x, y, 1)Benjamin Kramer2010-06-161-0/+3
| | | | | | | | The memcmp will be optimized further and even the pathological case 'strstr(x, "x") == x' generates optimal code now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106097 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify-libcalls: fold strstr(a, b) == a -> strncmp(a, b, strlen(b)) == 0Benjamin Kramer2010-06-152-0/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106047 91177308-0d34-0410-b5e6-96231b3b80d8
* jump threading can't split a critical edge from an indirectbr. ThisChris Lattner2010-06-141-1/+6
| | | | | | | fixes PR7356. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105950 91177308-0d34-0410-b5e6-96231b3b80d8
* SimplifyCFG: don't turn volatile stores to null/undef into unreachable. ↵Benjamin Kramer2010-06-131-0/+3
| | | | | | Fixes PR7369. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105914 91177308-0d34-0410-b5e6-96231b3b80d8
* Pulled CodeMetrics out of InlineCost.h and made it a bit more general, so it ↵Kenneth Uildriks2010-06-091-1/+1
| | | | | | can be reused from PartialSpecializationCost git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105725 91177308-0d34-0410-b5e6-96231b3b80d8
* Make bugpoint dead-argument-hacking actually work, and actually test it.Dan Gohman2010-06-071-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105551 91177308-0d34-0410-b5e6-96231b3b80d8
* Partial specialization was not checking the callsite to make sure it was ↵Kenneth Uildriks2010-06-051-9/+33
| | | | | | using the same constants as the specialization, leading to calls to the wrong specialization. Patch by Takumi Nakamura\! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105528 91177308-0d34-0410-b5e6-96231b3b80d8