[PATCH] D109134: [MemorySSA] Support invariant.group metadata
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 3 11:39:13 PDT 2021
asbirlea added inline comments.
================
Comment at: llvm/lib/Analysis/MemorySSA.cpp:2525
+ PointerUsesQueue.push_back(U);
+ continue;
+ }
----------------
nit: move the continue outside, in the `if(auto* GEP.` condition.
================
Comment at: llvm/lib/Analysis/MemorySSA.cpp:2534
+ getLoadStorePointerOperand(U) == Ptr) {
+ if (DT.dominates(U, MostDominatingInstruction))
+ MostDominatingInstruction = U;
----------------
nikic wrote:
> This check is now redundant, already checked above.
+1, remove second if.
================
Comment at: llvm/lib/Analysis/MemorySSA.cpp:2561
+ auto *ClobberDA = ClobberMA->getDefiningAccess();
+ assert(ClobberDA);
+ return ClobberDA;
----------------
You shouldn't need this assert. The defining access cannot be null. Can simplify to:
```
if (auto *LI = dyn_cast<LoadInst>(I))
return ClobberMA->getDefiningAccess();
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109134/new/
https://reviews.llvm.org/D109134
More information about the llvm-commits
mailing list