aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/ObjCARC
Commit message (Collapse)AuthorAgeFilesLines
* Teach the ARC optimizer about the !clang.arc.copy_on_escape metadataDan Gohman2011-10-171-5/+41
| | | | | | | | tag on objc_retainBlock calls, which indicates that they may be optimized away. rdar://10211286. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142298 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress partial retain+release elimination when there's aDan Gohman2011-10-171-0/+31
| | | | | | | | possibility that it will span multiple CFG diamonds/triangles which could have different controlling predicates. rdar://10282956 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142222 91177308-0d34-0410-b5e6-96231b3b80d8
* When eliminating unnecessary retain+autorelease on return values,Dan Gohman2011-09-291-0/+59
| | | | | | | | handle the case where the retain is in a different basic block. rdar://10210274. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140815 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't eliminate objc_retainBlock calls on stack objects if theDan Gohman2011-09-291-0/+54
| | | | | | | | objc_retainBlock call is potentially responsible for copying the block to the heap to extend its lifetime. rdar://10209613. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140814 91177308-0d34-0410-b5e6-96231b3b80d8
* objc_retainBlock is not NoModRef because it can update forwarding pointersDan Gohman2011-09-141-0/+39
| | | | | | | in memory relevant to the optimizer. rdar://10050579. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139708 91177308-0d34-0410-b5e6-96231b3b80d8
* Update more tests to the new EH scheme.Bill Wendling2011-08-313-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138894 91177308-0d34-0410-b5e6-96231b3b80d8
* Constant pointers to objects don't need reference counting.Dan Gohman2011-08-221-0/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138242 91177308-0d34-0410-b5e6-96231b3b80d8
* Make a few tests slightly more strict.Dan Gohman2011-08-221-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138241 91177308-0d34-0410-b5e6-96231b3b80d8
* Track a retain+release nesting level independently of theDan Gohman2011-08-191-0/+68
| | | | | | | | | known-incremented level, because the two concepts can be used to prove the saftey of a retain+release removal in different ways. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138016 91177308-0d34-0410-b5e6-96231b3b80d8
* Move "atomic" and "volatile" designations on instructions after the opcodeEli Friedman2011-08-121-2/+2
| | | | | | | | | | | | of the instruction. Note that this change affects the existing non-atomic load and store instructions; the parser now accepts both forms, and the change is noted in the release notes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137527 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't convert objc_autoreleaseReturnValue to objc_autorelease if the resultDan Gohman2011-08-121-0/+11
| | | | | | | is returned through a bitcast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137402 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't let arbitrary calls disrupt nested retain+release pairs ifDan Gohman2011-08-122-0/+931
| | | | | | | | | | the retains and releases all use the same SSA pointer value. Also, don't let CFG hazards disrupt nested retain+release pair optimizations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137399 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up these testcases to look more like real code does.Dan Gohman2011-08-091-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137085 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the last uses of RetainFunc etc. over to using getRetainCallee() etc.Dan Gohman2011-07-221-6/+42
| | | | | | | | so that a declaration for objc_retain is created when needed if it doesn't already exist. rdar://9825114. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135821 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ARCOpt to insert releases on both successors of an invoke ratherDan Gohman2011-06-161-0/+67
| | | | | | | than trying to insert them immediately after the invoke. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133188 91177308-0d34-0410-b5e6-96231b3b80d8
* The ARC language-specific optimizer. Credit to Dan Gohman.John McCall2011-06-1519-0/+3383
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133108 91177308-0d34-0410-b5e6-96231b3b80d8