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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 12:29:22 PDT 2020


nikic added a comment.

In D88921#2317223 <https://reviews.llvm.org/D88921#2317223>, @efriedma wrote:

> Any opinion on whether we should change callCapturesBefore()?  Given it only has three existing callers, probably worth looking into.

There's actually only one other caller in MemDepAnalysis (rest is comments or trivial forwarding), where it is used to determine whether a call can mod/ref a location: https://github.com/llvm/llvm-project/blob/9c09e2055ee4d4e3b26e393ab460635825a79538/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp#L622 The current noalias handling seems reasonable to me, mostly in the sense that it matches how noalias would be treated for non-calls. (If I understand the full implication here, whether the result of an AA/MD query is "correct" actually depends on whether you are querying a location that corresponds to a real IR access, and then it is only valid at that access.)


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

https://reviews.llvm.org/D88921



More information about the llvm-commits mailing list