[PATCH] D136822: [InstCombine] Allow memcpys from constant memory to readonly noalias parameters to be elided.

Patrick Walton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 21:03:58 PDT 2022


pcwalton marked an inline comment as done.
pcwalton added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:93
+        if ((Call->onlyReadsMemory() && (Call->use_empty() || !CapturesArg)) ||
+            (IsArgOperand && Call->onlyReadsMemory(DataOpNo) && !CapturesArg))
           continue;
----------------
nikic wrote:
> Why the `IsArgOperand` check here?
Hmm, it was necessary to avoid an assert in varargs in earlier versions of the patch that checked the attributes directly, but it doesn't seem necessary anymore. I'll remove it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136822



More information about the llvm-commits mailing list