llvm-project/llvm/test/Transforms/ObjCARC
Akira Hatanaka 6fdcb3c2ce [ObjCARC] Do not move a release between a call and a
retainAutoreleasedReturnValue that retains the returned value.

This commit fixes a bug in ARC optimizer where it moves a release
between a call and a retainAutoreleasedReturnValue, causing the returned
object to be released before the retainAutoreleasedReturnValue can
retain it.

This commit accomplishes that by doing a lookahead and checking whether
the call prevents the release from moving upwards. In the long term, we
should treat the region between the retainAutoreleasedReturnValue and
the call as a critical section and disallow moving anything there
(possibly using operand bundles).

rdar://problem/20449878

llvm-svn: 301724
2017-04-29 00:23:11 +00:00
..
allocas.ll
apelim.ll
basic.ll
cfg-hazards.ll
clang-arc-use-barrier.ll [ObjCARC] Do not sink an objc_retain past a clang.arc.use. 2017-04-25 04:06:35 +00:00
comdat-ipo.ll
contract-end-of-use-list.ll
contract-marker.ll
contract-replace-arg-use.ll
contract-storestrong-ivar.ll
contract-storestrong.ll [ObjCArc] Do not dereference an invalidated iterator. 2017-04-05 03:44:09 +00:00
contract-testcases.ll
contract.ll
empty-block.ll
ensure-that-exception-unwind-path-is-visited.ll
escape.ll
expand.ll
gvn.ll
intrinsic-use-isolated.ll
intrinsic-use.ll [ObjCARC] Do not sink an objc_retain past a clang.arc.use. 2017-04-25 04:06:35 +00:00
invoke.ll
move-and-form-retain-autorelease.ll
move-and-merge-autorelease.ll
nested.ll
path-overflow.ll
pointer-types.ll
post-inlining.ll
pr12270.ll
provenance.ll
retain-block-side-effects.ll
retain-not-declared.ll
rle-s2l.ll
rv.ll [ObjCARC] Do not move a release between a call and a 2017-04-29 00:23:11 +00:00
split-backedge.ll
tail-call-invariant-enforcement.ll
unsafe-claim-rv.ll
weak-contract.ll
weak-copies.ll
weak-dce.ll
weak.ll