[polly] r177771 - ScopInfo: do not call getCanonicalInductionVariable for SCEVCodegen

Sebastian Pop spop at codeaurora.org
Fri Mar 22 15:07:43 PDT 2013


Author: spop
Date: Fri Mar 22 17:07:43 2013
New Revision: 177771

URL: http://llvm.org/viewvc/llvm-project?rev=177771&view=rev
Log:
ScopInfo: do not call getCanonicalInductionVariable for SCEVCodegen

Modified:
    polly/trunk/lib/Analysis/ScopInfo.cpp

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=177771&r1=177770&r2=177771&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Fri Mar 22 17:07:43 2013
@@ -17,13 +17,13 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "polly/ScopInfo.h"
-
-#include "polly/TempScopInfo.h"
+#include "polly/CodeGen/BlockGenerators.h"
 #include "polly/LinkAllPasses.h"
+#include "polly/ScopInfo.h"
 #include "polly/Support/GICHelper.h"
 #include "polly/Support/ScopHelper.h"
 #include "polly/Support/SCEVValidator.h"
+#include "polly/TempScopInfo.h"
 
 #include "llvm/Analysis/LoopInfo.h"
 #include "llvm/Analysis/ScalarEvolutionExpressions.h"
@@ -591,9 +591,11 @@ ScopStmt::ScopStmt(Scop &parent, TempSco
   : Parent(parent), BB(&bb), IVS(Nest.size()), NestLoops(Nest.size()) {
   // Setup the induction variables.
   for (unsigned i = 0, e = Nest.size(); i < e; ++i) {
-    PHINode *PN = Nest[i]->getCanonicalInductionVariable();
-    if (PN)
+    if (!SCEVCodegen) {
+      PHINode *PN = Nest[i]->getCanonicalInductionVariable();
+      assert(PN && "Non canonical IV in Scop!");
       IVS[i] = PN;
+    }
     NestLoops[i] = Nest[i];
   }
 





More information about the llvm-commits mailing list