diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index 0fb08767083f..5d444540e74b 100644 --- a/polly/include/polly/ScopInfo.h +++ b/polly/include/polly/ScopInfo.h @@ -1709,9 +1709,6 @@ private: /// The underlying Region. Region &R; - /// The name of the SCoP (identical to the regions name) - std::string name; - /// The ID to be assigned to the next Scop in a function static int NextScopID; @@ -2442,7 +2439,7 @@ public: /// could be executed. bool isEmpty() const { return Stmts.empty(); } - const StringRef getName() const { return name; } + const StringRef getName() const { return R.getNameStr(); } using array_iterator = ArrayInfoSetTy::iterator; using const_array_iterator = ArrayInfoSetTy::const_iterator; diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index f5127efc4ff9..8ffd6a3c415d 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -3327,8 +3327,8 @@ Scop::Scop(Region &R, ScalarEvolution &ScalarEvolution, LoopInfo &LI, DominatorTree &DT, ScopDetection::DetectionContext &DC, OptimizationRemarkEmitter &ORE) : IslCtx(isl_ctx_alloc(), isl_ctx_free), SE(&ScalarEvolution), DT(&DT), - R(R), name(R.getNameStr()), HasSingleExitEdge(R.getExitingBlock()), - DC(DC), ORE(ORE), Affinator(this, LI), + R(R), HasSingleExitEdge(R.getExitingBlock()), DC(DC), ORE(ORE), + Affinator(this, LI), ID(getNextID((*R.getEntry()->getParent()).getName().str())) { if (IslOnErrorAbort) isl_options_set_on_error(getIslCtx().get(), ISL_ON_ERROR_ABORT);