[PATCH] D88921: [MemCpyOpt] Fix thread-safety of call slot opimization
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 9 19:59:45 PDT 2020
jdoerfert added a comment.
Commit message:
>> If the destination is captured, we need to check that the copy instruction is executed, to exclude concurrent access from another thread.
In D88921#2315685 <https://reviews.llvm.org/D88921#2315685>, @efriedma wrote:
>> If the caller is nosync there is no need for all this thread safety checking.
>
> I'm not sure nosync helps here? The issue this patch is trying to solve is the case where the memcpy is dynamically dead due to an infinite loop; there isn't any synchronization involved.
If it is nosync there is no concurrent access without it being a race and therefore UB.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88921/new/
https://reviews.llvm.org/D88921
More information about the llvm-commits
mailing list