aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2021-12-13 10:54:53 +0100
committerNikita Popov <npopov@redhat.com>2022-01-20 09:30:20 +0100
commit655a7024dbbc65ac2e3867094157746905cfd3a3 (patch)
tree20fbee958448a893d7e9d0854628e53be0ae3373 /llvm/lib/Support/VirtualFileSystem.cpp
parentbaa08d1ec3e20dc9107099119e7f27e3fbdc780d (diff)
downloadllvm-655a7024dbbc65ac2e3867094157746905cfd3a3.zip
llvm-655a7024dbbc65ac2e3867094157746905cfd3a3.tar.gz
llvm-655a7024dbbc65ac2e3867094157746905cfd3a3.tar.bz2
Reapply [MemCpyOpt] Make capture check during call slot optimization more precise
This is a recommit of the patch without changes. The reason for the revert has been addressed in D117679. ----- Call slot optimization is currently supposed to be prevented if the call can capture the source pointer. Due to an implementation bug, this check currently doesn't trigger if a bitcast of the source pointer is passed instead. I'm somewhat afraid of the fallout of fixing this bug (due to heavy reliance on call slot optimization in rust), so I'd like to strengthen the capture reasoning a bit first. In particular, I believe that the capture is fine as long as a) the call itself cannot depend on the pointer identity, because neither dest has been captured before/at nor src before the call and b) there is no potential use of the captured pointer before the lifetime of the source alloca ends, either due to lifetime.end or a return from a function. At that point the potentially captured pointer becomes dangling. Differential Revision: https://reviews.llvm.org/D115615
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
0 files changed, 0 insertions, 0 deletions