[PATCH] D108724: [LoopPredication] Preserve MemorySSA

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 25 13:48:51 PDT 2021


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopPredication.cpp:329
   void getAnalysisUsage(AnalysisUsage &AU) const override {
     AU.addRequired<BranchProbabilityInfoWrapperPass>();
     getLoopAnalysisUsage(AU);
----------------
Should mark MemorySSAWrapperPass as preserved here.


================
Comment at: llvm/lib/Transforms/Scalar/LoopPredication.cpp:825
   Guard->setOperand(0, AllChecks);
-  RecursivelyDeleteTriviallyDeadInstructions(OldCond);
+  RecursivelyDeleteTriviallyDeadInstructions(OldCond, nullptr /* TLI */, MSSAU);
 
----------------
There's another RecursivelyDeleteTriviallyDeadInstructions() use in the function below, needs to be adjusted as well?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108724



More information about the llvm-commits mailing list