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/Analysis | |
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/Analysis')
-rw-r--r-- | polly/lib/Analysis/ScopDetection.cpp | 15 | ||||
-rw-r--r-- | polly/lib/Analysis/ScopDetectionDiagnostic.cpp | 37 | ||||
-rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 16 |
3 files changed, 3 insertions, 65 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index a7801b087c5..d0b28564da8 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -577,12 +577,7 @@ bool ScopDetection::isValidInstruction(Instruction &Inst, DetectionContext &Context) const { if (PHINode *PN = dyn_cast<PHINode>(&Inst)) if (!canSynthesize(PN, LI, SE, &Context.CurRegion)) { - if (SCEVCodegen) - return invalid<ReportPhiNodeRefInRegion>(Context, /*Assert=*/true, - &Inst); - else - return invalid<ReportNonCanonicalPhiNode>(Context, /*Assert=*/true, - &Inst); + return invalid<ReportPhiNodeRefInRegion>(Context, /*Assert=*/true, &Inst); } // We only check the call instruction but not invoke instruction. @@ -609,14 +604,6 @@ bool ScopDetection::isValidInstruction(Instruction &Inst, } bool ScopDetection::isValidLoop(Loop *L, DetectionContext &Context) const { - if (!SCEVCodegen) { - // If code generation is not in scev based mode, we need to ensure that - // each loop has a canonical induction variable. - PHINode *IndVar = L->getCanonicalInductionVariable(); - if (!IndVar) - return invalid<ReportLoopHeader>(Context, /*Assert=*/true, L); - } - // Is the loop count affine? const SCEV *LoopCount = SE->getBackedgeTakenCount(L); if (!isAffineExpr(&Context.CurRegion, LoopCount, *SE)) diff --git a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp index 34e7ef7a622..6e869cf3e60 100644 --- a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp +++ b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp @@ -351,43 +351,6 @@ bool ReportPhiNodeRefInRegion::classof(const RejectReason *RR) { } //===----------------------------------------------------------------------===// -// ReportNonCanonicalPhiNode. - -ReportNonCanonicalPhiNode::ReportNonCanonicalPhiNode(Instruction *Inst) - : ReportIndVar(rrkNonCanonicalPhiNode), Inst(Inst) {} - -std::string ReportNonCanonicalPhiNode::getMessage() const { - return "Non canonical PHI node: " + *Inst; -} - -const DebugLoc &ReportNonCanonicalPhiNode::getDebugLoc() const { - return Inst->getDebugLoc(); -} - -bool ReportNonCanonicalPhiNode::classof(const RejectReason *RR) { - return RR->getKind() == rrkNonCanonicalPhiNode; -} - -//===----------------------------------------------------------------------===// -// ReportLoopHeader. - -ReportLoopHeader::ReportLoopHeader(Loop *L) - : ReportIndVar(rrkLoopHeader), L(L) {} - -std::string ReportLoopHeader::getMessage() const { - return ("No canonical IV at loop header: " + L->getHeader()->getName()).str(); -} - -const DebugLoc &ReportLoopHeader::getDebugLoc() const { - BasicBlock *BB = L->getHeader(); - return BB->getTerminator()->getDebugLoc(); -} - -bool ReportLoopHeader::classof(const RejectReason *RR) { - return RR->getKind() == rrkLoopHeader; -} - -//===----------------------------------------------------------------------===// // ReportIndEdge. ReportIndEdge::ReportIndEdge(BasicBlock *BB) diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 23a52814ab4..1b85804909f 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -17,7 +17,6 @@ // //===----------------------------------------------------------------------===// -#include "polly/CodeGen/BlockGenerators.h" #include "polly/LinkAllPasses.h" #include "polly/ScopInfo.h" #include "polly/Options.h" @@ -905,16 +904,10 @@ void ScopStmt::deriveAssumptions() { ScopStmt::ScopStmt(Scop &parent, TempScop &tempScop, const Region &CurRegion, BasicBlock &bb, SmallVectorImpl<Loop *> &Nest, SmallVectorImpl<unsigned> &Scatter) - : Parent(parent), BB(&bb), IVS(Nest.size()), NestLoops(Nest.size()) { + : Parent(parent), BB(&bb), NestLoops(Nest.size()) { // Setup the induction variables. - for (unsigned i = 0, e = Nest.size(); i < e; ++i) { - if (!SCEVCodegen) { - PHINode *PN = Nest[i]->getCanonicalInductionVariable(); - assert(PN && "Non canonical IV in Scop!"); - IVS[i] = PN; - } + for (unsigned i = 0, e = Nest.size(); i < e; ++i) NestLoops[i] = Nest[i]; - } BaseName = getIslCompatibleName("Stmt_", &bb, ""); @@ -1076,11 +1069,6 @@ unsigned ScopStmt::getNumScattering() const { const char *ScopStmt::getBaseName() const { return BaseName.c_str(); } -const PHINode * -ScopStmt::getInductionVariableForDimension(unsigned Dimension) const { - return IVS[Dimension]; -} - const Loop *ScopStmt::getLoopForDimension(unsigned Dimension) const { return NestLoops[Dimension]; } |