Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Analysis/MemorySSA.cpp | ||
---|---|---|
135 | 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: |
The only nit as far as printing is that MA is printed before being optimized, and printing it afterwards (as part of the "clobbered by" section), will make it look different.
For example, in the added test, before: "3 = MemoryDef(2) " and after: "[...] clobbered by 3 = MemoryDef(2)->liveOnEntry".
Not a big deal since this is for informational/debugging purposes only, but if you want to bikeshed... =]
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.