[PATCH] D109028: [MemorySSA] Add pass to print results of MemorySSA walker

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 31 16:23:16 PDT 2021


asbirlea added inline comments.


================
Comment at: llvm/lib/Analysis/MemorySSA.cpp:135
+      if (MemoryAccess *Clobber = Walker->getClobberingMemoryAccess(MA))
+        OS << "; " << *Clobber << "\n";
+  }
----------------
This should print `MA` if you're just trying to first optimize, then print.

To properly print what the getClobbering returns for invariant groups, you'll need something custom, along the lines:
`MA->getID() << " = MemoryDef(" <<MA->getDefiningAccess()->getID()<< "->" Clobber->getID();`, and analogous for MemoryUses
See the print approach in lib/Analysis/MemorySSA.cpp:2148, the optimized access needs to be updated to the ones returned by the walker, not the stored one.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109028/new/

https://reviews.llvm.org/D109028



More information about the llvm-commits mailing list