mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 12:02:58 +02:00
c59f1a814a
The reason that this occurs is that tail calling objc_autorelease eventually tail calls -[NSObject autorelease] which supports fast autorelease. This can cause us to violate the semantic gaurantees of __autoreleasing variables that assignment to an __autoreleasing variables always yields an object that is placed into the innermost autorelease pool. The fix included in this patch works by: 1. In the peephole optimization function OptimizeIndividualFunctions, always remove tail call from objc_autorelease. 2. Whenever we convert to/from an objc_autorelease, set/unset the tail call keyword as appropriate. *NOTE* I also handled the case where objc_autorelease is converted in OptimizeReturns to an autoreleaseRV which still violates the ARC semantics. I will be removing that in a later patch and I wanted to make sure that the tree is in a consistent state vis-a-vis ARC always. Additionally some test cases are provided and all tests that have tail call marked objc_autorelease keywords have been modified so that tail call has been removed. *NOTE* One test fails due to a separate bug that I am going to commit soon. Thus I marked the check line TMP: instead of CHECK: so make check does not fail. llvm-svn: 172287 |
||
---|---|---|
.. | ||
apelim.ll | ||
basic.ll | ||
cfg-hazards.ll | ||
contract-marker.ll | ||
contract-storestrong-ivar.ll | ||
contract-storestrong.ll | ||
contract-testcases.ll | ||
contract.ll | ||
empty-block.ll | ||
escape.ll | ||
expand.ll | ||
gvn.ll | ||
invoke.ll | ||
lit.local.cfg | ||
move-and-form-retain-autorelease.ll | ||
move-and-merge-autorelease.ll | ||
nested.ll | ||
no-objc-arc-exceptions.ll | ||
path-overflow.ll | ||
pointer-types.ll | ||
post-inlining.ll | ||
pr12270.ll | ||
retain-block-alloca.ll | ||
retain-block-load.ll | ||
retain-block-side-effects.ll | ||
retain-block.ll | ||
retain-not-declared.ll | ||
rle-s2l.ll | ||
rv.ll | ||
split-backedge.ll | ||
tail-call-invariant-enforcement.ll | ||
weak-contract.ll | ||
weak-copies.ll | ||
weak-dce.ll | ||
weak.ll |