[PATCH] D108386: [GuardWidening] Preserve MemorySSA

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 10:20:30 PDT 2021


asbirlea added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/GuardWidening.cpp:774
   auto &PDT = AM.getResult<PostDominatorTreeAnalysis>(F);
-  if (!GuardWideningImpl(DT, &PDT, LI, DT.getRootNode(),
+  if (!GuardWideningImpl(DT, &PDT, LI, /*MSSAU*/ nullptr, DT.getRootNode(),
                          [](BasicBlock*) { return true; } ).run())
----------------
Does it make sense to get the cached analysis in the Function pass if it exists and preserve it too in that case?


================
Comment at: llvm/lib/Transforms/Scalar/GuardWidening.cpp:819
     auto &PDT = getAnalysis<PostDominatorTreeWrapperPass>().getPostDomTree();
-    return GuardWideningImpl(DT, &PDT, LI, DT.getRootNode(),
+    return GuardWideningImpl(DT, &PDT, LI, /*MSSAU*/ nullptr, DT.getRootNode(),
                          [](BasicBlock*) { return true; } ).run();
----------------
Why not also preserve in the Function pass if MemorySSA is available?


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

https://reviews.llvm.org/D108386



More information about the llvm-commits mailing list