llvm-6502/test/Transforms/ObjCARC
Michael Gottesman 0d92a3c600 [ObjCARC] Strength reduce objc_retainBlock -> objc_retain if the objc_retainBlock is optimizable.
If an objc_retainBlock has the copy_on_escape metadata attached to it
AND if the block pointer argument only escapes down the stack, we are
allowed to strength reduce the objc_retainBlock to to an objc_retain and
thus optimize it.

Current there is logic in the ARC data flow analysis to handle
this case which is complicated and involved making distinctions in
between objc_retainBlock and objc_retain in certain places and
considering them the same in others.

This patch simplifies said code by:

1. Performing the strength reduction in the initial ARC peephole
analysis (ObjCARCOpts::OptimizeIndividualCalls).

2. Changes the ARC dataflow analysis (which runs after the peephole
analysis) to consider all objc_retainBlock calls to not be optimizable
(since if the call was optimizable, we would have strength reduced it
already).

This patch leaves in the infrastructure in the ARC dataflow analysis to
handle this case, which due to 2 will just be dead code. I am doing this
on purpose to separate the removal of the old code from the testing of
the new code.

<rdar://problem/13249661>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178284 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28 20:11:19 +00:00
..
apelim.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
arc-annotations.ll Added back in the test for arc-annotations. 2013-03-27 00:09:58 +00:00
basic.ll [ObjCARC] Strength reduce objc_retainBlock -> objc_retain if the objc_retainBlock is optimizable. 2013-03-28 20:11:19 +00:00
cfg-hazards.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
contract-marker.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
contract-storestrong-ivar.ll
contract-storestrong.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
contract-testcases.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
contract.ll Kill every call to @clang.arc.use in the ARC contract phase. 2013-03-22 21:38:36 +00:00
empty-block.ll
ensure-that-exception-unwind-path-is-visited.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
escape.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
expand.ll
gvn.ll This test is only supposed to test that the objc-arc alias analysis 2013-01-22 04:41:11 +00:00
intrinsic-use.ll Add an optimizer-side test case for ARC bug <rdar://13195034>, fixed 2013-03-25 22:09:52 +00:00
invoke.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
lit.local.cfg
move-and-form-retain-autorelease.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
move-and-merge-autorelease.ll
nested.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
no-objc-arc-exceptions.ll [ObjCARC] Strength reduce objc_retainBlock -> objc_retain if the objc_retainBlock is optimizable. 2013-03-28 20:11:19 +00:00
path-overflow.ll
pointer-types.ll
post-inlining.ll
pr12270.ll
retain-block-alloca.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
retain-block-escape-analysis.ll Reduced dont-infinite-loop-during-block-escape-analysis.ll with bugpoint and moved it to retain-block-escape-analysis.ll. 2013-03-17 21:31:12 +00:00
retain-block-load.ll
retain-block-side-effects.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
retain-block.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
retain-not-declared.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
rle-s2l.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
rv.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
split-backedge.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
tail-call-invariant-enforcement.ll Fixed bug in ObjCARC where we were changing a call from objc_autoreleaseRV => objc_autorelease but were not updating the InstructionClass to IC_Autorelease. 2013-01-12 01:25:19 +00:00
weak-contract.ll
weak-copies.ll Use references to attribute groups on the call/invoke instructions. 2013-02-22 09:09:42 +00:00
weak-dce.ll
weak.ll