[PATCH] D60833: [MemorySSA] Teach LoopSimplify to preserve MemorySSA.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 16:38:13 PDT 2019


chandlerc added a comment.

In D60833#1472530 <https://reviews.llvm.org/D60833#1472530>, @asbirlea wrote:

> It's not as much the ew-ness that bothers me.
>  It's that, if MemorySSA is to be preserved and widely used in the loop pass, then this infrastructure change is needed anyway.
>
> The `simplifyLoop` API is called from a bunch of other *loop* passes. Whenever these are updated, we'll need to teach this API to make the update (the new pass manager will care too)
>  Following this patch, it will be much easier to just get MemorySSA analysis pass and pass it along to the API that already does the right thing. This same approach saved me a lot of time when I updated the other `Utils`. If you notice in this patch, the calls to `formDedicatedExitBlocks` or `SplitBlockPredecessors` are already doing the right thing.
>
> You're quite right that this is not a requirement to enable MemorySSA in the new pass manager. I am hoping it is not as big of a change to block it, and that it opens up more paths.
>  If it turns out to be a blocker, I'm happy to split the EnableMSSALoopDependency flag in 2 for the 2 pass managers and flip just one. What do you think?


I see, the fact that this is mostly about getting the utility code to preserve makes lots of sense.

Minor comment below, will look in a bit more detail soon.



================
Comment at: include/llvm/Transforms/Utils/LoopSimplify.h:60
 /// it into a simplified loop nest with preheaders and single backedges. It will
 /// update \c AliasAnalysis and \c ScalarEvolution analyses if they're non-null.
 bool simplifyLoop(Loop *L, DominatorTree *DT, LoopInfo *LI, ScalarEvolution *SE,
----------------
Comment needs updating.


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