[polly] r310795 - [ScopInfo] Translate ParameterIds to isl++

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 13 10:54:51 PDT 2017


Author: grosser
Date: Sun Aug 13 10:54:51 2017
New Revision: 310795

URL: http://llvm.org/viewvc/llvm-project?rev=310795&view=rev
Log:
[ScopInfo] Translate ParameterIds to isl++

Modified:
    polly/trunk/include/polly/ScopInfo.h
    polly/trunk/lib/Analysis/ScopInfo.cpp

Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=310795&r1=310794&r2=310795&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Sun Aug 13 10:54:51 2017
@@ -1730,7 +1730,7 @@ private:
   ParameterSetTy Parameters;
 
   /// Mapping from parameters to their ids.
-  DenseMap<const SCEV *, isl_id *> ParameterIds;
+  DenseMap<const SCEV *, isl::id> ParameterIds;
 
   /// The context of the SCoP created during SCoP detection.
   ScopDetection::DetectionContext &DC;

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=310795&r1=310794&r2=310795&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sun Aug 13 10:54:51 2017
@@ -2180,8 +2180,8 @@ void Scop::createParameterId(const SCEV
     ParameterName = getIslCompatibleName("", ParameterName, "");
   }
 
-  auto *Id = isl_id_alloc(getIslCtx(), ParameterName.c_str(),
-                          const_cast<void *>((const void *)Parameter));
+  isl::id Id = isl::id::alloc(getIslCtx(), ParameterName.c_str(),
+                              const_cast<void *>((const void *)Parameter));
   ParameterIds[Parameter] = Id;
 }
 
@@ -2199,7 +2199,7 @@ void Scop::addParams(const ParameterSetT
 isl::id Scop::getIdForParam(const SCEV *Parameter) const {
   // Normalize the SCEV to get the representing element for an invariant load.
   Parameter = getRepresentingInvariantLoadSCEV(Parameter);
-  return isl::manage(isl_id_copy(ParameterIds.lookup(Parameter)));
+  return ParameterIds.lookup(Parameter);
 }
 
 isl::set Scop::addNonEmptyDomainConstraints(isl::set C) const {
@@ -3698,8 +3698,7 @@ Scop::~Scop() {
   isl_set_free(InvalidContext);
   isl_schedule_free(Schedule);
 
-  for (auto &It : ParameterIds)
-    isl_id_free(It.second);
+  ParameterIds.clear();
 
   for (auto &AS : RecordedAssumptions)
     isl_set_free(AS.Set);




More information about the llvm-commits mailing list