From 1dafea411439edff6339c95af25c1a52bde9f243 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Mon, 23 May 2016 09:07:08 +0000 Subject: [PATCH] Make the detection context non-constant [NFC] llvm-svn: 270410 --- polly/include/polly/ScopDetection.h | 2 +- polly/include/polly/ScopInfo.h | 4 ++-- polly/lib/Analysis/ScopDetection.cpp | 2 +- polly/lib/Analysis/ScopInfo.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/polly/include/polly/ScopDetection.h b/polly/include/polly/ScopDetection.h index 851763e3727a..38c8a834211a 100644 --- a/polly/include/polly/ScopDetection.h +++ b/polly/include/polly/ScopDetection.h @@ -525,7 +525,7 @@ public: bool isMaxRegionInScop(const Region &R, bool Verify = true) const; /// @brief Return the detection context for @p R, nullptr if @p R was invalid. - const DetectionContext *getDetectionContext(const Region *R) const; + DetectionContext *getDetectionContext(const Region *R) const; /// @brief Return the set of rejection causes for @p R. const RejectLog *lookupRejectionLog(const Region *R) const; diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index b8e64dbd3e76..487f40a7efc9 100644 --- a/polly/include/polly/ScopInfo.h +++ b/polly/include/polly/ScopInfo.h @@ -1354,7 +1354,7 @@ private: DenseMap ParameterIds; /// @brief The context of the SCoP created during SCoP detection. - const ScopDetection::DetectionContext &DC; + ScopDetection::DetectionContext &DC; /// Isl context. /// @@ -1495,7 +1495,7 @@ private: /// @brief Scop constructor; invoked from ScopInfo::buildScop. Scop(Region &R, ScalarEvolution &SE, LoopInfo &LI, - const ScopDetection::DetectionContext &DC); + ScopDetection::DetectionContext &DC); /// @brief Get or create the access function set in a BasicBlock AccFuncSetType &getOrCreateAccessFunctions(const BasicBlock *BB) { diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index 9aa969ae5f08..5cc333624a4a 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -1500,7 +1500,7 @@ bool ScopDetection::runOnFunction(llvm::Function &F) { return false; } -const ScopDetection::DetectionContext * +ScopDetection::DetectionContext * ScopDetection::getDetectionContext(const Region *R) const { auto DCMIt = DetectionContextMap.find(getBBPairForRegion(R)); if (DCMIt == DetectionContextMap.end()) diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 6c2612ae1350..f256b456541b 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -3052,7 +3052,7 @@ static Loop *getLoopSurroundingRegion(Region &R, LoopInfo &LI) { } Scop::Scop(Region &R, ScalarEvolution &ScalarEvolution, LoopInfo &LI, - const ScopDetection::DetectionContext &DC) + ScopDetection::DetectionContext &DC) : SE(&ScalarEvolution), R(R), IsOptimized(false), HasSingleExitEdge(R.getExitingBlock()), HasErrorBlock(false), MaxLoopDepth(0), DC(DC), IslCtx(isl_ctx_alloc(), isl_ctx_free),