From 91ad092bb2268cef887156e6ceaca8d552b7a4f6 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Mon, 28 Sep 2015 01:29:44 +0000 Subject: [PATCH] [NFC] Remove unused SCoP diagnostic llvm-svn: 248694 --- polly/include/polly/ScopDetectionDiagnostic.h | 61 ------------------- .../lib/Analysis/ScopDetectionDiagnostic.cpp | 44 ------------- 2 files changed, 105 deletions(-) diff --git a/polly/include/polly/ScopDetectionDiagnostic.h b/polly/include/polly/ScopDetectionDiagnostic.h index a83cb175a70a..ad49763faf06 100644 --- a/polly/include/polly/ScopDetectionDiagnostic.h +++ b/polly/include/polly/ScopDetectionDiagnostic.h @@ -80,11 +80,6 @@ enum RejectReasonKind { rrkDifferentElementSize, rrkLastAffFunc, - // IndVar - rrkIndVar, - rrkPhiNodeRefInRegion, - rrkLastIndVar, - rrkIndEdge, rrkLoopBound, @@ -100,7 +95,6 @@ enum RejectReasonKind { rrkIntToPtr, rrkAlloca, rrkUnknownInst, - rrkPHIinExit, rrkEntry, rrkUnprofitable, rrkLastOther @@ -532,40 +526,6 @@ public: //@} }; -//===----------------------------------------------------------------------===// -/// @brief Base class for reject reasons related to induction variables. -/// -// ReportIndVar reject reasons are generated when the ScopDetection finds -/// errors in the induction variable(s) of the Scop candidate. -class ReportIndVar : public RejectReason { - //===--------------------------------------------------------------------===// -public: - ReportIndVar(const RejectReasonKind K); -}; - -//===----------------------------------------------------------------------===// -/// @brief Captures a phi node that refers to SSA names in the current region. -class ReportPhiNodeRefInRegion : public ReportIndVar { - //===--------------------------------------------------------------------===// - - // The offending instruction. - Instruction *Inst; - -public: - ReportPhiNodeRefInRegion(Instruction *Inst); - - /// @name LLVM-RTTI interface - //@{ - static bool classof(const RejectReason *RR); - //@} - - /// @name RejectReason interface - //@{ - virtual std::string getMessage() const override; - virtual const DebugLoc &getDebugLoc() const override; - //@} -}; - //===----------------------------------------------------------------------===// /// @brief Captures a region with invalid entering edges. class ReportIndEdge : public RejectReason { @@ -783,27 +743,6 @@ public: //@} }; -//===----------------------------------------------------------------------===// -/// @brief Captures errors with phi nodes in exit BBs. -class ReportPHIinExit : public ReportOther { - //===--------------------------------------------------------------------===// - Instruction *Inst; - -public: - ReportPHIinExit(Instruction *Inst); - - /// @name LLVM-RTTI interface - //@{ - static bool classof(const RejectReason *RR); - //@} - - /// @name RejectReason interface - //@{ - virtual std::string getMessage() const override; - virtual const DebugLoc &getDebugLoc() const override; - //@} -}; - //===----------------------------------------------------------------------===// /// @brief Captures errors with regions containing the function entry block. class ReportEntry : public ReportOther { diff --git a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp index 09f3a5ac9b24..c7265bd26cff 100644 --- a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp +++ b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp @@ -40,7 +40,6 @@ STATISTIC(Bad##NAME##ForScop, "Number of bad regions for Scop: " DESC) BADSCOP_STAT(CFG, "CFG too complex"); -BADSCOP_STAT(IndVar, "Non canonical induction variable in loop"); BADSCOP_STAT(IndEdge, "Found invalid region entering edges"); BADSCOP_STAT(LoopBound, "Loop bounds can not be computed"); BADSCOP_STAT(FuncCall, "Function call with side effects appeared"); @@ -301,31 +300,6 @@ std::string ReportNonAffineAccess::getEndUserMessage() const { return "The array subscript of \"" + Name + "\" is not affine"; } -//===----------------------------------------------------------------------===// -// ReportIndVar. - -ReportIndVar::ReportIndVar(const RejectReasonKind K) : RejectReason(K) { - ++BadIndVarForScop; -} - -//===----------------------------------------------------------------------===// -// ReportPhiNodeRefInRegion. - -ReportPhiNodeRefInRegion::ReportPhiNodeRefInRegion(Instruction *Inst) - : ReportIndVar(rrkPhiNodeRefInRegion), Inst(Inst) {} - -std::string ReportPhiNodeRefInRegion::getMessage() const { - return "SCEV of PHI node refers to SSA names in region: " + *Inst; -} - -const DebugLoc &ReportPhiNodeRefInRegion::getDebugLoc() const { - return Inst->getDebugLoc(); -} - -bool ReportPhiNodeRefInRegion::classof(const RejectReason *RR) { - return RR->getKind() == rrkPhiNodeRefInRegion; -} - //===----------------------------------------------------------------------===// // ReportIndEdge. @@ -534,24 +508,6 @@ bool ReportUnknownInst::classof(const RejectReason *RR) { return RR->getKind() == rrkUnknownInst; } -//===----------------------------------------------------------------------===// -// ReportPHIinExit. - -ReportPHIinExit::ReportPHIinExit(Instruction *Inst) - : ReportOther(rrkPHIinExit), Inst(Inst) {} - -std::string ReportPHIinExit::getMessage() const { - return "PHI node in exit BB"; -} - -const DebugLoc &ReportPHIinExit::getDebugLoc() const { - return Inst->getDebugLoc(); -} - -bool ReportPHIinExit::classof(const RejectReason *RR) { - return RR->getKind() == rrkPHIinExit; -} - //===----------------------------------------------------------------------===// // ReportEntry. ReportEntry::ReportEntry(BasicBlock *BB) : ReportOther(rrkEntry), BB(BB) {}