summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-04-05 22:54:28 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-04-05 22:54:28 +0000
commit1d8d25777dd107ca541b0315f582238096816b50 (patch)
treec94b31a0a7e0871301ade85673cc2961b7237ad6 /clang/lib/Sema/SemaDeclCXX.cpp
parent3b59f5c804277bd82d2617e60273e48696c00048 (diff)
downloadbcm5719-llvm-1d8d25777dd107ca541b0315f582238096816b50.tar.gz
bcm5719-llvm-1d8d25777dd107ca541b0315f582238096816b50.zip
Properly model precise lifetime when given an incomplete dataflow sequence.
The normal dataflow sequence in the ARC optimizer consists of the following states: Retain -> CanRelease -> Use -> Release The optimizer before this patch stored the uses that determine the lifetime of the retainable object pointer when it bottom up hits a retain or when top down it hits a release. This is correct for an imprecise lifetime scenario since what we are trying to do is remove retains/releases while making sure that no ``CanRelease'' (which is usually a call) deallocates the given pointer before we get to the ``Use'' (since that would cause a segfault). If we are considering the precise lifetime scenario though, this is not correct. In such a situation, we *DO* care about the previous sequence, but additionally, we wish to track the uses resulting from the following incomplete sequences: Retain -> CanRelease -> Release (TopDown) Retain <- Use <- Release (BottomUp) *NOTE* This patch looks large but the most of it consists of updating test cases. Additionally this fix exposed an additional bug. I removed the test case that expressed said bug and will recommit it with the fix in a little bit. llvm-svn: 178921
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud