[PATCH] D121381: [MemorySSA] Support lazy use optimization
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 17 15:02:27 PDT 2022
asbirlea accepted this revision.
asbirlea added a comment.
This revision is now accepted and ready to land.
LGTM with a couple nits.
================
Comment at: llvm/include/llvm/Analysis/MemorySSA.h:350
+ /// Whether the MemoryUse is optimized. If ensureOptimizedUses() was called,
+ /// then all uses should be optimized.
bool isOptimized() const {
----------------
This is not necessarily true due to the cap set by MaxCheckLimit (memssa-check-limit).
Also not true if a MemoryDef was added that invalidated optimizations (`OptimizedID` will no longer match).
================
Comment at: llvm/include/llvm/Analysis/MemorySSA.h:805
+ /// MemorySSA instance. This should be done if you plan to query the
+ /// clobbering access for most uses, or if you walk the def-use chain of uses.
+ void ensureOptimizedUses();
----------------
Add: `By default, during MemorySSA build, uses are *not* optimized`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121381/new/
https://reviews.llvm.org/D121381
More information about the llvm-commits
mailing list