summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/ObjCARC
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix objc_storeStrong pattern matching to catch a potential use of theDan Gohman2012-05-081-0/+76
| | | | | | | old value after the store but before it is released. This fixes rdar:/11116986. llvm-svn: 156442
* Avoid a bug in the path count computation, preventing an infiniteDan Gohman2012-04-191-0/+48
| | | | | | loop repeatedlt making the same change. This is for rdar://11256239. llvm-svn: 155160
* Consider ObjC runtime calls objc_storeWeak and others which make a copy ofDan Gohman2012-04-131-0/+131
| | | | | | | their argument as "escape" points for objc_retainBlock optimization. This fixes rdar://11229925. llvm-svn: 154682
* Use the new Use-aware dominates method to apply the objc runtimeDan Gohman2012-04-131-0/+18
| | | | | | | library return value optimization for phi uses. Even when the phi itself is not dominated, the specific use may be dominated. llvm-svn: 154647
* Don't move objc_autorelease calls past autorelease pool boundaries whenDan Gohman2012-04-131-4/+78
| | | | | | | optimizing autorelease calls on phi nodes with null operands. This fixes rdar://11207070. llvm-svn: 154642
* Fix accidentally inverted logic from r152803, and make theDan Gohman2012-04-051-0/+6
| | | | | | testcase slightly less trivial. This fixes rdar://11171718. llvm-svn: 154118
* Don't convert objc_retainAutoreleasedReturnValue to objc_retain if itDan Gohman2012-03-232-1/+44
| | | | | | is retaining the return value of an invoke that it immediately follows. llvm-svn: 153344
* It's not possible to insert code immediately after an invoke in theDan Gohman2012-03-231-0/+66
| | | | | | | | | | | | same basic block, and it's not safe to insert code in the successor blocks if the edges are critical edges. Splitting those edges is possible, but undesirable, especially on the unwind side. Instead, make the bottom-up code motion to consider invokes to be part of their successor blocks, rather than part of their parent blocks, so that it doesn't push code past them and onto the edges. This fixes PR12307. llvm-svn: 153343
* Short term fix for pr12270 before we change dominates to handle unreachableRafael Espindola2012-03-151-0/+15
| | | | | | | code. While here, reduce indentation. llvm-svn: 152803
* When an invoke is marked with metadata indicating its unwind edgeDan Gohman2012-03-141-0/+36
| | | | | | | should be ignored by ARC optimization, don't insert new ARC runtime calls in the unwind destination. llvm-svn: 152748
* When identifying exit nodes for the reverse-CFG reverse-post-orderDan Gohman2012-03-092-4/+213
| | | | | | | | | traversal, consider nodes for which the only successors are backedges which the traversal is ignoring to be exit nodes. This fixes a problem where the bottom-up traversal was failing to visit split blocks along split loop backedges. This fixes rdar://10989035. llvm-svn: 152421
* Calls and invokes with the new clang.arc.no_objc_arc_exceptionsDan Gohman2012-02-171-0/+122
| | | | | | | | metadata may still unwind, but only in ways that the ARC optimizer doesn't need to consider. This permits more aggressive optimization. llvm-svn: 150829
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-162-3/+1
| | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. llvm-svn: 150664
* Just like in regular escape analysis, loads and stores throughDan Gohman2012-02-131-0/+51
| | | | | | | (but not of) a block pointer do not cause the block pointer to escape. This fixes rdar://10803830. llvm-svn: 150424
* Set the "tail" flag on pattern-matched objc_storeStrong calls.Dan Gohman2012-01-192-2/+2
| | | | | | rdar://10531041. llvm-svn: 148490
* Use llvm.global_ctors to locate global constructors insteadDan Gohman2012-01-181-0/+2
| | | | | | of recognizing them by name. llvm-svn: 148416
* Add a new ObjC ARC optimization pass to eliminate unneededDan Gohman2012-01-171-0/+51
| | | | | | autorelease push+pop pairs. llvm-svn: 148330
* Implement proper ObjC ARC objc_retainBlock "escape" analysis, so thatDan Gohman2012-01-132-2/+155
| | | | | | | | the optimizer doesn't eliminate objc_retainBlock calls which are needed for their side effect of copying blocks onto the heap. This implements rdar://10361249. llvm-svn: 148076
* It turns out that clang does use pointer-to-function types toDan Gohman2011-12-142-1/+34
| | | | | | point to ARC-managed pointers sometimes. This fixes rdar://10551239. llvm-svn: 146577
* Upgrade syntax of tests using volatile instructions to use 'load volatile' ↵Chris Lattner2011-11-272-4/+4
| | | | | | instead of 'volatile load', which is archaic. llvm-svn: 145171
* 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. llvm-svn: 142298
* 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 llvm-svn: 142222
* 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. llvm-svn: 140815
* 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. llvm-svn: 140814
* objc_retainBlock is not NoModRef because it can update forwarding pointersDan Gohman2011-09-141-0/+39
| | | | | | in memory relevant to the optimizer. rdar://10050579. llvm-svn: 139708
* Update more tests to the new EH scheme.Bill Wendling2011-08-313-0/+16
| | | | llvm-svn: 138894
* Constant pointers to objects don't need reference counting.Dan Gohman2011-08-221-0/+33
| | | | llvm-svn: 138242
* Make a few tests slightly more strict.Dan Gohman2011-08-221-2/+3
| | | | llvm-svn: 138241
* 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. llvm-svn: 138016
* 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. llvm-svn: 137527
* Don't convert objc_autoreleaseReturnValue to objc_autorelease if the resultDan Gohman2011-08-121-0/+11
| | | | | | is returned through a bitcast. llvm-svn: 137402
* 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. llvm-svn: 137399
* Tidy up these testcases to look more like real code does.Dan Gohman2011-08-091-9/+9
| | | | llvm-svn: 137085
* 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. llvm-svn: 135821
* 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. llvm-svn: 133188
* The ARC language-specific optimizer. Credit to Dan Gohman.John McCall2011-06-1519-0/+3383
llvm-svn: 133108
OpenPOWER on IntegriCloud