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

Easwaran Raman via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 14:53:11 PDT 2016


eraman marked an inline comment as done.

================
Comment at: lib/Transforms/Utils/LCSSA.cpp:345
@@ +344,3 @@
+  // ported to the new PM and the legacy LoopSimplify pass has a call to
+  // mustPreserveAnalysisID(LCSSAID) in its runOnFunction method. So, for now,
+  // we are not preserving LoopSimplify.
----------------
davide wrote:
> This is a sore point. I think mustPreserveAnalysisID(LCSSAID) should become an assert in the new PM which verifies that the IR mutation didn't destroy LCSSA.
> In other words, mustPreserveAnalysisID(LCSSAID) might need to go away.
Could you elaborate on this a bit more? The current state is that loop transformation passes call mustPreserveAnalysisID(LCSSAID) to determine if LCSSA is available and ensures that the transformation preserves LCSSA by calling addPreserved. How will this look in the new PM?

Incidentally, LoopSimplify (and a few others) do not actually call addPreservedID(LCSSAID). Isn't this a bug?  



================
Comment at: test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll:5-9
@@ -4,3 +4,7 @@
 ; RUN:    not grep "%X.1.lcssa1"
-
+; Using the new PM version of the pass
+; RUN: opt < %s -passes=lcssa -S | \
+; RUN:    grep "%X.1.lcssa"
+; RUN: opt < %s -passes=lcssa -S | \
+; RUN:    not grep "%X.1.lcssa1"
 declare i1 @c1()
----------------
I committed r272065 that made the original tests use FileCheck


http://reviews.llvm.org/D21090





More information about the llvm-commits mailing list