[PATCH] D88921: [MemCpyOpt] Fix thread-safety of call slot opimization

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 16:48:14 PDT 2020


jdoerfert added a comment.

> It turns out that this doesn't really change much: If the destination is captured, then the call itself needs to be argmemonly to not potentially modify the destination, and argmemonly currently (incorrectly...) implies willreturn. Thus the only requirement that actually gets added in practice is nounwind (even for alloca dest).

I did not get this :(

---

If the caller is `nosync` there is no need for all this thread safety checking.

---

The `isGuaranteedToTransferExecutionToSuccessor` loop is not necessary for `nounwind` + `willreturn` functions.

---

I feel we probably need the same logic in different places and this might even deserve a helper.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88921/new/

https://reviews.llvm.org/D88921



More information about the llvm-commits mailing list