aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* don't bother calling getUnderlyingObject for non-pointers.Chris Lattner2008-02-181-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47272 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a missing space in the description of the find-bugs option.Dan Gohman2008-02-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47271 91177308-0d34-0410-b5e6-96231b3b80d8
* Since we're not checking for the more general AllocationInst first, we need ↵Owen Anderson2008-02-181-1/+1
| | | | | | | | | to explicitly check that Object is an Argument before casting it to one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47268 91177308-0d34-0410-b5e6-96231b3b80d8
* New helper function getMBBFromIndex() that given an index in any instruction ↵Roman Levenstein2008-02-182-16/+30
| | | | | | of an MBB returns a pointer the MBB. Reviewed by Evan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47267 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to GVN for performing sret return slot optimization. This means ↵Owen Anderson2008-02-182-2/+94
| | | | | | | | | | | | that, if an sret function tail calls another sret function, it should pass its own sret parameter to the tail callee, allowing it to fill in the correct return value. llvm-gcc does not emit this by default. Instead, it allocates space in the caller for the sret of the tail call and then uses memcpy to copy the result into the caller's sret parameter. This optimization detects and optimizes that case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47265 91177308-0d34-0410-b5e6-96231b3b80d8
* I got the predicate backwards in my last patch. The comment is correct, the ↵Owen Anderson2008-02-181-1/+1
| | | | | | code was not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47264 91177308-0d34-0410-b5e6-96231b3b80d8
* This check is not correct for mallocs, so exclude them earlier.Owen Anderson2008-02-181-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47263 91177308-0d34-0410-b5e6-96231b3b80d8
* For now, avoid commuting def MI for copy MI's whose source is not killed. ↵Evan Cheng2008-02-181-0/+7
| | | | | | That simply trade a live interval for another and because only the non-two-address operands can be folded into loads, may end up pessimising code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47262 91177308-0d34-0410-b5e6-96231b3b80d8
* switch simplifycfg from using vectors for most things to smallvectors,Chris Lattner2008-02-181-14/+12
| | | | | | | this speeds it up 2.3% on eon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47261 91177308-0d34-0410-b5e6-96231b3b80d8
* optimize away stackrestore calls that have no intervening alloca or call.Chris Lattner2008-02-182-13/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47258 91177308-0d34-0410-b5e6-96231b3b80d8
* upgrade this test.Chris Lattner2008-02-181-11/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47257 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify that 'sret' only applies to pointers, andDuncan Sands2008-02-181-2/+3
| | | | | | | only applies to the first parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47256 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the definition of the noalias attribute clearer.Owen Anderson2008-02-181-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47255 91177308-0d34-0410-b5e6-96231b3b80d8
* Duncan pointed out that we can fast fail here, because the sret parameter ofOwen Anderson2008-02-181-1/+2
| | | | | | | a function must be the first parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47254 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment, and a bug where we weren't applying the tail call logic in ↵Owen Anderson2008-02-181-6/+8
| | | | | | cases that failed the first test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47253 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bugs that Chris noticed in my last patch.Owen Anderson2008-02-181-9/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47252 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some code, BreakUpSubtract always returns nonnull now.Chris Lattner2008-02-181-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47251 91177308-0d34-0410-b5e6-96231b3b80d8
* bitcasts of pointers are always pointers.Chris Lattner2008-02-181-5/+2
| | | | | | | | If we see a memcpy of a pointer, make sure to check later uses of the pointer as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47250 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for setting parameters to CallSite.Owen Anderson2008-02-181-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47249 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a predicate to Argument to check for the StructRet attribute.Owen Anderson2008-02-172-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47248 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach getModRefInfo that memcpy, memmove, and memset don't "capture" memory ↵Owen Anderson2008-02-171-3/+13
| | | | | | | | | | addresses. Also, noalias arguments are be considered "like" stack allocated ones for this purpose, because the only way they can be modref'ed is if they escape somewhere in the current function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47247 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold (-x + -y) -> -(x+y) which promotes better association, fixingChris Lattner2008-02-172-2/+22
| | | | | | | the second half of PR2047 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47244 91177308-0d34-0410-b5e6-96231b3b80d8
* fix pastoChris Lattner2008-02-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47242 91177308-0d34-0410-b5e6-96231b3b80d8
* Split up subtracts into add+negate if they have a reassociable use or operandChris Lattner2008-02-172-5/+21
| | | | | | | that is also a subtract. This implements PR2047 and Transforms/Reassociate/subtest2.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47241 91177308-0d34-0410-b5e6-96231b3b80d8
* upgrade and simplify this test.Chris Lattner2008-02-171-6/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47240 91177308-0d34-0410-b5e6-96231b3b80d8
* make the logic for breaking up subtracts more explicit, no Chris Lattner2008-02-171-9/+22
| | | | | | | functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47239 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade.Tanya Lattner2008-02-1750-906/+906
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47238 91177308-0d34-0410-b5e6-96231b3b80d8
* move PR2053 to here.Chris Lattner2008-02-171-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47237 91177308-0d34-0410-b5e6-96231b3b80d8
* fix this test.Chris Lattner2008-02-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47232 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgradeTanya Lattner2008-02-171-10/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47231 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade.Tanya Lattner2008-02-172-17/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47230 91177308-0d34-0410-b5e6-96231b3b80d8
* this test isn't useful since we added @ notation for globals.Chris Lattner2008-02-171-21/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47229 91177308-0d34-0410-b5e6-96231b3b80d8
* this line was commented out.Chris Lattner2008-02-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47228 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade and update tests.Tanya Lattner2008-02-162-31/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47227 91177308-0d34-0410-b5e6-96231b3b80d8
* Removing llvm upgrade, so remove tests specific to llvm-upgrade and update ↵Tanya Lattner2008-02-1627-13270/+13054
| | | | | | the tests that used it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47225 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove any 'nest' parameter attributes if the functionDuncan Sands2008-02-162-10/+109
| | | | | | | is not passed as an argument to a trampoline intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47220 91177308-0d34-0410-b5e6-96231b3b80d8
* Some micro-optimizations.Duncan Sands2008-02-161-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47219 91177308-0d34-0410-b5e6-96231b3b80d8
* I cannot find a libgcc function for this builtin. Therefor expanding it to ↵Andrew Lenharth2008-02-169-9/+33
| | | | | | a noop (which is how it use to be treated). If someone who knows the x86 backend better than me could tell me how to get a lock prefix on an instruction, that would be nice to complete x86 support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47213 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach LegalizeTypes how to expand the operands ofDuncan Sands2008-02-162-4/+25
| | | | | | | br_cc. This fixes 5 "make check" failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47212 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to clarify which compilers can be used for theDuncan Sands2008-02-161-6/+7
| | | | | | | build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47211 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor some code; check if commuteInstruction is able to commute the ↵Evan Cheng2008-02-162-17/+34
| | | | | | instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47208 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm.memory.barrier, and impl for x86 and alphaAndrew Lenharth2008-02-1617-1/+256
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47204 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos.Bill Wendling2008-02-161-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47200 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename CountMemOperands to ComputeMemOperandsEnd to reflect whatDan Gohman2008-02-162-17/+15
| | | | | | | | it actually does. Simplify CountOperands a little by reusing ComputeMemOperandsEnd. And reword some comments for both. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47198 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 47177, which was incorrect.Dan Gohman2008-02-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47196 91177308-0d34-0410-b5e6-96231b3b80d8
* upgrade this test, which wasn't testing the right thing since llvm-upgrade ↵Chris Lattner2008-02-151-7/+7
| | | | | | came around. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47194 91177308-0d34-0410-b5e6-96231b3b80d8
* rename llx -> llChris Lattner2008-02-151-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47192 91177308-0d34-0410-b5e6-96231b3b80d8
* This test is not interesting.Evan Cheng2008-02-151-21/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47189 91177308-0d34-0410-b5e6-96231b3b80d8
* Make tblgen a little smarter about constants smaller than i32. Currently,Scott Michel2008-02-154-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | tblgen will complain if a sign-extended constant does not fit into a data type smaller than i32, e.g., i16. This causes a problem when certain hex constants are used, such as 0xff for byte masks or immediate xor values. tblgen will try the sign-extended value first and, if the sign extended value would overflow, it tries to see if the unsigned value will fit. Consequently, a software developer can now safely incant: (XORHIr16 R16C:$rA, 0xffff) which is somewhat clearer and more informative than incanting: (XORHIr16 R16C:$rA, (i16 -1)) even if the two are bitwise equivalent. Tblgen also outputs the 64-bit unsigned constant in the generated ISel code when getTargetConstant() is invoked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47188 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify this.Chris Lattner2008-02-151-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47187 91177308-0d34-0410-b5e6-96231b3b80d8