[polly] r252419 - Verify IR after we bail out

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 8 08:34:19 PST 2015


Author: jdoerfert
Date: Sun Nov  8 10:34:17 2015
New Revision: 252419

URL: http://llvm.org/viewvc/llvm-project?rev=252419&view=rev
Log:
Verify IR after we bail out

  The bail out in r252412 left the code generation without verifying the (so
  far) generated IR. This will change now and ensure we always run the
  verifier.

Suggested-by: Tobias Grosser <tobias at grosser.es>


Modified:
    polly/trunk/lib/CodeGen/CodeGeneration.cpp

Modified: polly/trunk/lib/CodeGen/CodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/CodeGeneration.cpp?rev=252419&r1=252418&r2=252419&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/CodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/CodeGeneration.cpp Sun Nov  8 10:34:17 2015
@@ -150,22 +150,24 @@ public:
     // If the hoisting fails we have to bail and execute the original code.
     Builder.SetInsertPoint(SplitBlock->getTerminator());
     if (!NodeBuilder.preloadInvariantLoads()) {
+
       auto *FalseI1 = Builder.getFalse();
       Builder.GetInsertBlock()->getTerminator()->setOperand(0, FalseI1);
       isl_ast_node_free(AstRoot);
-      return true;
-    }
 
-    NodeBuilder.addParameters(S.getContext());
+    } else {
 
-    Value *RTC = buildRTC(Builder, NodeBuilder.getExprBuilder());
-    Builder.GetInsertBlock()->getTerminator()->setOperand(0, RTC);
-    Builder.SetInsertPoint(&StartBlock->front());
+      NodeBuilder.addParameters(S.getContext());
 
-    NodeBuilder.create(AstRoot);
+      Value *RTC = buildRTC(Builder, NodeBuilder.getExprBuilder());
+      Builder.GetInsertBlock()->getTerminator()->setOperand(0, RTC);
+      Builder.SetInsertPoint(&StartBlock->front());
 
-    NodeBuilder.finalizeSCoP(S);
-    fixRegionInfo(EnteringBB->getParent(), R->getParent());
+      NodeBuilder.create(AstRoot);
+
+      NodeBuilder.finalizeSCoP(S);
+      fixRegionInfo(EnteringBB->getParent(), R->getParent());
+    }
 
     assert(!verifyGeneratedFunction(S, *EnteringBB->getParent()) &&
            "Verification of generated function failed");




More information about the llvm-commits mailing list