diff options
author | Tobias Grosser <tobias@grosser.es> | 2014-11-30 14:33:31 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2014-11-30 14:33:31 +0000 |
commit | 683b8e44627b7c64d623e29a5dd607df8f29f512 (patch) | |
tree | ce42511e12fc059dd20cab974edeacb209de54aa /polly/lib/CodeGen/BlockGenerators.cpp | |
parent | 65b2b03fa4ca6b15cce8b871e40d7bc9139ab9f4 (diff) | |
download | bcm5719-llvm-683b8e44627b7c64d623e29a5dd607df8f29f512.tar.gz bcm5719-llvm-683b8e44627b7c64d623e29a5dd607df8f29f512.zip |
Remove -polly-codegen-scev option and related code
SCEV based code generation has been the default for two weeks after having
been tested for a long time. We now drop the support the non-scev-based code
generation.
llvm-svn: 222978
Diffstat (limited to 'polly/lib/CodeGen/BlockGenerators.cpp')
-rw-r--r-- | polly/lib/CodeGen/BlockGenerators.cpp | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index e483cae5347..4c0762ca69d 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -39,30 +39,17 @@ static cl::opt<bool> Aligned("enable-polly-aligned", cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); -static cl::opt<bool, true> - SCEVCodegenF("polly-codegen-scev", - cl::desc("Use SCEV based code generation."), cl::Hidden, - cl::location(SCEVCodegen), cl::init(true), cl::ZeroOrMore, - cl::cat(PollyCategory)); - -bool polly::SCEVCodegen; - bool polly::canSynthesize(const Instruction *I, const llvm::LoopInfo *LI, ScalarEvolution *SE, const Region *R) { - if (SCEVCodegen) { - if (!I || !SE->isSCEVable(I->getType())) - return false; - - if (const SCEV *Scev = SE->getSCEV(const_cast<Instruction *>(I))) - if (!isa<SCEVCouldNotCompute>(Scev)) - if (!hasScalarDepsInsideRegion(Scev, R)) - return true; - + if (!I || !SE->isSCEVable(I->getType())) return false; - } - Loop *L = LI->getLoopFor(I->getParent()); - return L && I == L->getCanonicalInductionVariable() && R->contains(L); + if (const SCEV *Scev = SE->getSCEV(const_cast<Instruction *>(I))) + if (!isa<SCEVCouldNotCompute>(Scev)) + if (!hasScalarDepsInsideRegion(Scev, R)) + return true; + + return false; } BlockGenerator::BlockGenerator(PollyIRBuilder &B, ScopStmt &Stmt, Pass *P, @@ -91,7 +78,7 @@ Value *BlockGenerator::getNewValue(const Value *Old, ValueMapT &BBMap, if (Value *New = BBMap.lookup(Old)) return New; - if (SCEVCodegen && SE.isSCEVable(Old->getType())) + if (SE.isSCEVable(Old->getType())) if (const SCEV *Scev = SE.getSCEVAtScope(const_cast<Value *>(Old), L)) { if (!isa<SCEVCouldNotCompute>(Scev)) { const SCEV *NewScev = apply(Scev, LTS, SE); |