[PATCH] D60833: [MemorySSA] Teach LoopSimplify to preserve MemorySSA.
George Burgess IV via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 15:48:58 PDT 2019
george.burgess.iv added a comment.
I don't mean to interrupt the ongoing discussion; just wanted to send a few nits about the MSSA-specific bits. Thanks!
================
Comment at: lib/Transforms/Utils/Local.cpp:1903
+ if (MSSAU) {
+ BasicBlock::iterator BBI = I->getIterator(), BBE = BB->end();
+ while (BBI != BBE)
----------------
Would it be better to iterate over the block's MemoryAccess list instead of the entire BB? I'd be happy to have a new `removeBlock` method or similar in `MSSAU` to do this.
================
Comment at: lib/Transforms/Utils/Local.cpp:1908
+ if (MemoryPhi *MPhi = MSSAU->getMemorySSA()->getMemoryAccess(Successor))
+ MPhi->unorderedDeleteIncomingBlock(BB);
+ }
----------------
Do we also want to clean up any Phis that this trivializes (...assuming that's possible), or is the intent for that to be cleaned up later?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60833/new/
https://reviews.llvm.org/D60833
More information about the llvm-commits
mailing list