[PATCH] D73428: [Attributor] Improve `noalias` deduction based on memory information
Stefanos Baziotis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 14 19:22:14 PST 2020
baziotis added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2772-2774
+ // If the definition is not `noalias` we need to check globals in addition
+ // to arguments. If the definition is `noalias` we cannot alias globals to
+ // begin with.
----------------
Why do we know that?
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2792
+ bool
+ isKnownNoAliasAtCalleeDueToAccesses(Attributor &A,
+ const AAMemoryBehavior &MemBehaviorAA,
----------------
Maybe doc here (?) It looks similar to the above but some things I think would be good to be mentioned like why do we test for globals here.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2805
+ LLVM_DEBUG(
+ dbgs() << "[AANoAlias] Check access by " << I << " to " << Ptr << " ["
+ << AAMemoryLocation::getMemoryLocationsAsStr(MLK) << "]\n");
----------------
Maybe you want `*Ptr` here. Also maybe conditioned on `Ptr` (like above).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73428/new/
https://reviews.llvm.org/D73428
More information about the llvm-commits
mailing list