[PATCH] D21404: [PM] Port LoopSimplify to the new PM

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 15:25:33 PDT 2016

chandlerc added a comment.

I'd consolidate the APIs for loop simplify into the new header rather than have them split across multiple headers with this.

Comment at: include/llvm/Transforms/Utils/LoopSimplify.h:50
@@ +49,3 @@
+  PreservedAnalyses run(Function &F, AnalysisManager<Function> &AM);
+} // end namespace llvm
missing blank line after this...

(I hate this clang-format bug...)

Comment at: lib/Transforms/Utils/LoopSimplify.cpp:822-823
@@ +821,4 @@
+  if (Changed)
+    PreservedAnalyses::none();
+  PreservedAnalyses PA;
Er, this seems odd. Missing ! and return?

Comment at: lib/Transforms/Utils/LoopSimplify.cpp:826-828
@@ +825,5 @@
+  // The old PM also preserved LCSSAID and BreakCriticalEdgesID.
+  // This makes no sense in the new PM so we omit those from the set
+  // of preserved passes.
+  PA.preserve<DominatorTreeAnalysis>();
I don't think this comment will really age effectively. We're very likely to delete the old code and not update this in any awy.


More information about the llvm-commits mailing list