[PATCH] D157737: [Lint] Permit aliasing noalias and readnone arguments
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 11:01:29 PDT 2023
bjope added inline comments.
================
Comment at: llvm/lib/Analysis/Lint.cpp:240
+ // dereferenced anyway.
+ if (F->hasParamAttribute(ArgNo, Attribute::ReadNone))
+ continue;
----------------
bjope wrote:
> Maybe we need to check for NoCapture as well (that would be a bit more defensive at least)?
Given the example from https://godbolt.org/z/xY4hE9Kvb
If I remove NoCapture on the second argument then MemCpyOpt no longer rewrite the call. So then I actually think it would make sense to also check NoCapture here. Right?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157737/new/
https://reviews.llvm.org/D157737
More information about the llvm-commits
mailing list