[PATCH] D136659: [AliasAnalysis] Introduce getModRefMask() as a generalization of pointsToConstantMemory().
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 05:36:02 PDT 2022
nikic added a comment.
This looks basically good to me. I'd suggest precommitting the test changes with baseline checks, and then rebasing this patch.
================
Comment at: llvm/docs/AliasAnalysis.rst:171
+``getModRefInfoMask`` function uses this to refine mod/ref information: it is
+impossible for an unchanging memory location to be modified.
+
----------------
This doesn't line up with the implementation anymore. (Feel free to just delete this section entirely.)
================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:769
+ModRefInfo BasicAAResult::getModRefInfoMask(const MemoryLocation &Loc,
+ AAQueryInfo &AAQI,
----------------
Keeping the previous location of the function would make it a bit clearer what changed here.
================
Comment at: llvm/test/Analysis/BasicAA/readonly-noalias.ll:1
+; Tests that readonly noalias implies !Mod.
+;
----------------
This test can be merged into constant-memory.ll.
================
Comment at: llvm/test/Analysis/BasicAA/readonly-noalias.ll:13
+ ret void
+}
----------------
We should also have a negative test for the case where `noalias` on the argument is missing.
================
Comment at: llvm/test/Transforms/InstCombine/copied-from-readonly-noalias.ll:1
+; Tests that we can eliminate allocas copied from readonly noalias pointers.
+;
----------------
This test can be merged into memcpy-from-global.ll.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136659/new/
https://reviews.llvm.org/D136659
More information about the llvm-commits
mailing list