[PATCH] D21090: [PM] Port LCSSA to the new PM

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 12:10:57 PDT 2016


davide added a comment.

Some comments (waiting for the header).


================
Comment at: lib/Transforms/Utils/LCSSA.cpp:342
@@ +341,3 @@
+    return PreservedAnalyses::all();
+  else {
+    PreservedAnalyses PA;
----------------
`else` after `return`

================
Comment at: lib/Transforms/Utils/LCSSA.cpp:348
@@ +347,3 @@
+    PA.preserve<ScalarEvolutionAnalysis>();
+    // FIXME: The legacy pass preserves LoopSimplify pass. That pass is not yet
+    // ported to the new PM and the legacy LoopSimplify pass has a call to
----------------
I'd put the comment just before the declaration of `PA`

================
Comment at: test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll:5
@@ -4,2 +4,3 @@
 ; RUN:    not grep "%X.1.lcssa1"
-
+; Using the new PM version of the pass
+; RUN: opt < %s -passes=lcssa -S | \
----------------
This should really use `FileCheck` and not `grep`. Feel free to commit the change to the existing code separately.

================
Comment at: test/Transforms/LCSSA/basictest.ll:3
@@ -2,1 +2,3 @@
 ; RUN:   grep "X3.lcssa = phi i32"
+; RUN: opt < %s -passes=lcssa -S | \
+; RUN:   grep "X3.lcssa = phi i32"
----------------
Ditto.


http://reviews.llvm.org/D21090





More information about the llvm-commits mailing list