[PATCH] D19882: Add opt-bisect support to additional passes that can be skipped

Paul Robinson via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 14:26:43 PDT 2016


probinson accepted this revision.
probinson added a comment.
This revision is now accepted and ready to land.

SimplifyCFGPass needs to not call skipFunction twice, and one question on the test.
Otherwise LGTM.


================
Comment at: lib/Transforms/Scalar/Reg2Mem.cpp:71
@@ -70,3 +70,3 @@
 bool RegToMem::runOnFunction(Function &F) {
-  if (F.isDeclaration())
+  if (F.isDeclaration() || skipFunction(F))
     return false;
----------------
Not something for you to fix, but this just looks weird.  We run passes on functions that are just declarations?

================
Comment at: lib/Transforms/Scalar/SimplifyCFGPass.cpp:212
@@ -211,3 +211,3 @@
   bool runOnFunction(Function &F) override {
-    if (PredicateFtor && !PredicateFtor(F))
+    if (skipFunction(F) || (PredicateFtor && !PredicateFtor(F)))
       return false;
----------------
This one already calls skipFunction, just below. If you want to combine the conditions, for consistency with other passes, you should remove the other call.

================
Comment at: test/Other/opt-bisect-legacy-pass-manager.ll:142
@@ -139,4 +141,3 @@
 entry:
-  %temp = call i32 @g()
-  %icmp = icmp ugt i32 %temp, 2
+  %icmp = icmp ugt i32 undef, 2
   br i1 %icmp, label %bb.true, label %bb.false
----------------
It's not clear why you want to remove the call to function g.  If this is in response to a review comment from a different review, that cleanup should be done independently as its own commit.


Repository:
  rL LLVM

http://reviews.llvm.org/D19882





More information about the llvm-commits mailing list