From 4e318abece5ac274d2b48d3c9ea405479a73fe1c Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Thu, 21 Mar 2013 16:14:53 +0000 Subject: [PATCH] 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. llvm-svn: 177644 --- polly/lib/RegisterPasses.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/polly/lib/RegisterPasses.cpp b/polly/lib/RegisterPasses.cpp index a4e49dd..50a7b13 100644 --- a/polly/lib/RegisterPasses.cpp +++ b/polly/lib/RegisterPasses.cpp @@ -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(llvm::PassManagerBase &PM) { 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()); -- 2.7.4