mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-25 14:32:53 +00:00
acfb3584c5
In the presense of a block being initialized, the frontend will emit the objc_retain on the original pointer and the release on the pointer loaded from the alloca. The optimizer will through the provenance analysis realize that the two are related (albiet different), but since we only require KnownSafe in one direction, will match the inner retain on the original pointer with the guard release on the original pointer. This is fixed by ensuring that in the presense of allocas we only unconditionally remove pointers if both our retain and our release are KnownSafe (i.e. we are KnownSafe in both directions) since we must deal with the possibility that the frontend will emit what (to the optimizer) appears to be unbalanced retain/releases. An example of the miscompile is: %A = alloca retain(%x) retain(%x) <--- Inner Retain store %x, %A %y = load %A ... DO STUFF ... release(%y) call void @use(%x) release(%x) <--- Guarding Release getting optimized to: %A = alloca retain(%x) store %x, %A %y = load %A ... DO STUFF ... release(%y) call void @use(%x) rdar://13750319 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181743 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
DependencyAnalysis.cpp | ||
DependencyAnalysis.h | ||
LLVMBuild.txt | ||
Makefile | ||
ObjCARC.cpp | ||
ObjCARC.h | ||
ObjCARCAliasAnalysis.cpp | ||
ObjCARCAliasAnalysis.h | ||
ObjCARCAPElim.cpp | ||
ObjCARCContract.cpp | ||
ObjCARCExpand.cpp | ||
ObjCARCOpts.cpp | ||
ObjCARCUtil.cpp | ||
ProvenanceAnalysis.cpp | ||
ProvenanceAnalysis.h |