aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | metadata types which should be marked as "weak", but which the linker will remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205 91177308-0d34-0410-b5e6-96231b3b80d8
* Return Changed. This required setting Changed if dbg metadataDuncan Sands2010-06-291-5/+7
| | | | | | | | | is stripped off. Currently set unconditionally, since the API does not provide a way of working out if anything was actually stripped off. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107142 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand APIGabor Greif2010-06-281-12/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107017 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand APIGabor Greif2010-06-281-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107016 91177308-0d34-0410-b5e6-96231b3b80d8
* employ CallInst::ArgOffset (for now)Gabor Greif2010-06-281-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107015 91177308-0d34-0410-b5e6-96231b3b80d8
* use setArgOperandGabor Greif2010-06-281-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107004 91177308-0d34-0410-b5e6-96231b3b80d8
* use CallInst::ArgOffsetGabor Greif2010-06-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107003 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand API and CallInst::ArgOffsetGabor Greif2010-06-281-17/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107002 91177308-0d34-0410-b5e6-96231b3b80d8
* use cached valueGabor Greif2010-06-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107000 91177308-0d34-0410-b5e6-96231b3b80d8
* minor cleanup to SROA: when lowering type unsafe accesses toChris Lattner2010-06-271-1/+6
| | | | | | | | | large integers, the first inserted value would always create an 'or X, 0'. Even though this is trivially zapped by instcombine, don't bother creating this pointless instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106979 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR7328: when turning a tail recursion into a loop, need to preserveDuncan Sands2010-06-261-6/+6
| | | | | | | | | the returned value after the tail call if it differs from other return values. The optimal thing to do would be to introduce a phi node for the return value, but for the moment just fix the miscompile. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106947 91177308-0d34-0410-b5e6-96231b3b80d8
* In GenerateReassociations, don't bother thinking about individualDan Gohman2010-06-251-8/+22
| | | | | | | | | SCEVUnknown values which are loop-variant, as LSR can't do anything interesting with these values in any case. This fixes very slow compile times on loops which have large numbers of such values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106897 91177308-0d34-0410-b5e6-96231b3b80d8
* The hasMemory argument is irrelevant to how the argumentDale Johannesen2010-06-252-4/+2
| | | | | | | | | | | for an "i" constraint should get lowered; PR 6309. While this argument was passed around a lot, this is the only place it was used, so it goes away from a lot of other places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106893 91177308-0d34-0410-b5e6-96231b3b80d8
* 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