[polly] r177644 - Do not canonicalize indvars with scev based codegen

Tobias Grosser grosser at fim.uni-passau.de
Thu Mar 21 09:14:53 PDT 2013


Author: grosser
Date: Thu Mar 21 11:14:53 2013
New Revision: 177644

URL: http://llvm.org/viewvc/llvm-project?rev=177644&view=rev
Log:
Do not canonicalize indvars with scev based codegen

Scev code generation can now handle scops with non canonical induction
variables. Hence there is no need to introduce canonical ones any more.

Modified:
    polly/trunk/lib/RegisterPasses.cpp

Modified: polly/trunk/lib/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/RegisterPasses.cpp?rev=177644&r1=177643&r2=177644&view=diff
==============================================================================
--- polly/trunk/lib/RegisterPasses.cpp (original)
+++ polly/trunk/lib/RegisterPasses.cpp Thu Mar 21 11:14:53 2013
@@ -18,6 +18,7 @@
 #include "polly/ScopDetection.h"
 #include "polly/ScopInfo.h"
 #include "polly/TempScopInfo.h"
+#include "polly/CodeGen/BlockGenerators.h"
 #include "polly/CodeGen/CodeGeneration.h"
 
 #include "llvm/Analysis/Passes.h"
@@ -202,7 +203,9 @@ static void registerPollyPreoptPasses(ll
   PM.add(llvm::createReassociatePass());           // Reassociate expressions
   PM.add(llvm::createLoopRotatePass());            // Rotate Loop
   PM.add(llvm::createInstructionCombiningPass());
-  PM.add(polly::createIndVarSimplifyPass());        // Canonicalize indvars
+
+  if (!SCEVCodegen)
+    PM.add(polly::createIndVarSimplifyPass());
 
   PM.add(polly::createCodePreparationPass());
   PM.add(polly::createRegionSimplifyPass());





More information about the llvm-commits mailing list