[PATCH] D152743: [AliasAnalysis] Return NoModRef for loads from constant memory
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 12 12:56:33 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/AliasAnalysis.cpp:482
+ // If the load is from constant memory, it doesn't mod/ref anything.
+ if (!isRefSet(getModRefInfoMask(MemoryLocation::get(L))))
+ return ModRefInfo::NoModRef;
----------------
nikic wrote:
> Should probably use `Loc` rather than `MemoryLocation::get(L)` here, just like all the other methods?
Or I guess not, if the intention is to pick up TBAA metadata from the load itself?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152743/new/
https://reviews.llvm.org/D152743
More information about the llvm-commits
mailing list