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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 13:55:04 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:810
+  MemoryLocation destLoc(cpyDest, srcSize);
+  if (isModOrRefSet(AA->callCapturesBefore(C, destLoc, DT))) {
+    // Ensure dest is not accessed by the call.
----------------
callCapturesBefore only checks the call C itself.  Don't we also care if the pointer is captured somewhere before the call?


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