forked from OSchip/llvm-project
3279724905
Pair up inlined AutoreleaseRV calls with their matching RetainRV or ClaimRV. - RetainRV cancels out AutoreleaseRV. Delete both instructions. - ClaimRV is a peephole for RetainRV+Release. Delete AutoreleaseRV and replace ClaimRV with Release. This avoids problems where more aggressive inlining triggers memory regressions. This patch is happy to skip over non-callable instructions and non-ARC intrinsics looking for the pair. It is likely sound to also skip over opaque function calls, but that's harder to reason about, and it's not relevant to the goal here: if there's an opaque function call splitting up a pair, it's very unlikely that a handshake would have happened dynamically without inlining. Note that this patch also subsumes the previous logic that looked backwards from ReleaseRV. https://reviews.llvm.org/D70370 rdar://problem/46509586 |
||
---|---|---|
.. | ||
allocas.ll | ||
apelim.ll | ||
basic.ll | ||
cfg-hazards.ll | ||
clang-arc-use-barrier.ll | ||
code-motion.ll | ||
comdat-ipo.ll | ||
contract-catchswitch.ll | ||
contract-end-of-use-list.ll | ||
contract-marker-funclet.ll | ||
contract-marker.ll | ||
contract-max-bb-size.ll | ||
contract-replace-arg-use.ll | ||
contract-storestrong-funclet.ll | ||
contract-storestrong-ivar.ll | ||
contract-storestrong.ll | ||
contract-testcases.ll | ||
contract.ll | ||
empty-block.ll | ||
ensure-that-exception-unwind-path-is-visited.ll | ||
escape.ll | ||
expand.ll | ||
funclet.ll | ||
gvn.ll | ||
inert-global.ll | ||
inlined-autorelease-return-value.ll | ||
intrinsic-use-isolated.ll | ||
intrinsic-use.ll | ||
invoke-2.ll | ||
invoke.ll | ||
move-and-form-retain-autorelease.ll | ||
move-and-merge-autorelease.ll | ||
nested.ll | ||
opt-catchswitch.ll | ||
opt-max-ptr-states.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 | ||
split-backedge.ll | ||
tail-call-invariant-enforcement.ll | ||
unsafe-claim-rv.ll | ||
weak-contract.ll | ||
weak-copies.ll | ||
weak-dce.ll | ||
weak.ll |