summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* make the prototypes for CreateMalloc and CreateFree more consistent. PatchChris Lattner2010-07-121-2/+2
| | | | | | by Hans Vandierendonck from PR7605 llvm-svn: 108116
* if jump threading is able to infer interesting values on bothChris Lattner2010-07-121-2/+13
| | | | | | | | the LHS and RHS of an and/or instruction, don't multiply add known predecessor values. This fixes the crash on testcase from PR7498 llvm-svn: 108114
* The accumulator tail recursion transform claims to work for any associativeDuncan Sands2010-07-101-14/+14
| | | | | | | | | | | | | | | | operation, but the way it's implemented requires the operation to also be commutative. So add a check for commutativity (and tweak the corresponding comments). This makes no difference in practice since every associative LLVM instruction is also commutative! Here's an example to show the need for commutativity: the accum_recursion.ll testcase calculates the factorial function. Before the transformation the result of a call is ((((1*1)*2)*3)...)*x while afterwards it is (((1*x)*(x-1))...*2)*1 which clearly requires both associativity and commutativity of * to be equal to the original. llvm-svn: 108056
* cache result of operator*Gabor Greif2010-07-091-6/+6
| | | | llvm-svn: 107990
* cache result of operator*Gabor Greif2010-07-091-3/+5
| | | | llvm-svn: 107984
* cache result of operator*Gabor Greif2010-07-091-2/+4
| | | | llvm-svn: 107983
* cache result of operator*Gabor Greif2010-07-091-2/+3
| | | | llvm-svn: 107981
* cache result of operator*Gabor Greif2010-07-091-2/+3
| | | | llvm-svn: 107976
* cache result of operator*Gabor Greif2010-07-091-4/+6
| | | | llvm-svn: 107975
* cache result of operator*Gabor Greif2010-07-091-2/+3
| | | | llvm-svn: 107974
* cache result of operator*Gabor Greif2010-07-091-2/+3
| | | | llvm-svn: 107972
* cache result of operator* (found by inspection)Gabor Greif2010-07-091-2/+4
| | | | llvm-svn: 107971
* cache result of operator*Gabor Greif2010-07-091-6/+7
| | | | llvm-svn: 107969
* cache result of operator*Gabor Greif2010-07-091-3/+4
| | | | llvm-svn: 107968
* cache result of operator*Gabor Greif2010-07-091-3/+5
| | | | llvm-svn: 107966
* cache operator*'s result (in multiple functions)Gabor Greif2010-07-091-15/+22
| | | | llvm-svn: 107965
* do not repeatedly dereference use_iteratorGabor Greif2010-07-091-3/+4
| | | | llvm-svn: 107962
* Teach instcombine to transformBenjamin Kramer2010-07-081-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | (X >s -1) ? C1 : C2 and (X <s 0) ? C2 : C1 into ((X >>s 31) & (C2 - C1)) + C1, avoiding the conditional. This optimization could be extended to take non-const C1 and C2 but we better stay conservative to avoid code size bloat for now. for int sel(int n) { return n >= 0 ? 60 : 100; } we now generate sarl $31, %edi andl $40, %edi leal 60(%rdi), %eax instead of testl %edi, %edi movl $60, %ecx movl $100, %eax cmovnsl %ecx, %eax llvm-svn: 107866
* Fix the second half of PR7437: scalarrepl wasn't preservingChris Lattner2010-07-081-21/+9
| | | | | | address spaces when SRoA'ing memcpy's. llvm-svn: 107846
* Rename "Release" builds as "Release+Asserts"; rename "Release-Asserts"Duncan Sands2010-07-071-1/+1
| | | | | | | | | | | | | builds to "Release". The default build is unchanged (optimization on, assertions on), however it is now called Release+Asserts. The intent is that future LLVM releases released via llvm.org will be Release builds in the new sense, i.e. will have assertions disabled (currently they have assertions enabled, for a more than 20% slowdown). This will bring them in line with MacOS releases, which ship with assertions disabled. It also means that "Release" now means the same things in make and cmake builds: cmake already disables assertions for "Release" builds AFAICS. llvm-svn: 107758
* Detabify this file.Nick Lewycky2010-07-061-7/+7
| | | | llvm-svn: 107637
* MDString is already checked earlier.Devang Patel2010-07-021-1/+1
| | | | llvm-svn: 107516
* Don't claim to preserve AliasAnalysis. First, this is doesn't actuallyDan Gohman2010-07-021-1/+0
| | | | | | | have any effect, and second, deleting stores can potentially invalidate an AliasAnalysis, and there's currently no notification for this. llvm-svn: 107496
* Implement the "linker_private_weak" linkage type. This will be used forBill Wendling2010-07-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Objective-C metadata types which should be marked as "weak", but which the linker will remove upon final linkage. However, this linkage isn't specific to Objective-C. 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". Currently only supported on Darwin platforms. llvm-svn: 107433
* Debugging infomration is encoded in llvm IR using metadata. This is designedDevang Patel2010-07-011-0/+101
| | | | | | | | | such a way that debug info for symbols preserved even if symbols are optimized away by the optimizer. Add new special pass to remove debug info for such symbols. llvm-svn: 107416
* If a named mdnode is removed then mark module as changed.Devang Patel2010-07-011-1/+3
| | | | llvm-svn: 107412
* lowerinvoke needs to handle aggregate function args like sjlj eh does.Jim Grosbach2010-06-301-4/+4
| | | | llvm-svn: 107335
* Remove all debug info related named mdnodes.Devang Patel2010-06-301-10/+6
| | | | llvm-svn: 107323
* use ArgOperand APIGabor Greif2010-06-301-10/+12
| | | | llvm-svn: 107278
* use ArgOperand APIGabor Greif2010-06-301-2/+2
| | | | llvm-svn: 107277
* use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperandGabor Greif2010-06-301-3/+3
| | | | llvm-svn: 107275
* use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperandGabor Greif2010-06-301-1/+2
| | | | llvm-svn: 107273
* use getNumArgOperands instead of getNumOperandsGabor Greif2010-06-301-2/+2
| | | | llvm-svn: 107272
* use getArgOperand instead of getOperandGabor Greif2010-06-301-4/+4
| | | | llvm-svn: 107271
* use getArgOperand instead of getOperandGabor Greif2010-06-301-2/+2
| | | | llvm-svn: 107270
* use getArgOperand instead of getOperandGabor Greif2010-06-301-8/+8
| | | | llvm-svn: 107269
* Revert r107205 and r107207.Bill Wendling2010-06-291-1/+0
| | | | llvm-svn: 107215
* 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". llvm-svn: 107205
* 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. llvm-svn: 107142
* use ArgOperand APIGabor Greif2010-06-281-12/+12
| | | | llvm-svn: 107017
* use ArgOperand APIGabor Greif2010-06-281-4/+4
| | | | llvm-svn: 107016
* employ CallInst::ArgOffset (for now)Gabor Greif2010-06-281-2/+2
| | | | llvm-svn: 107015
* use setArgOperandGabor Greif2010-06-281-6/+6
| | | | llvm-svn: 107004
* use CallInst::ArgOffsetGabor Greif2010-06-281-1/+1
| | | | llvm-svn: 107003
* use ArgOperand API and CallInst::ArgOffsetGabor Greif2010-06-281-17/+17
| | | | llvm-svn: 107002
* use cached valueGabor Greif2010-06-281-1/+1
| | | | llvm-svn: 107000
* 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. llvm-svn: 106979
* 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. llvm-svn: 106947
* 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. llvm-svn: 106897
* 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. llvm-svn: 106893
OpenPOWER on IntegriCloud