[polly] r310220 - [ScopInfo] Translate Scop::getIdForParam to isl++ [NFC]

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 6 12:31:27 PDT 2017


Author: grosser
Date: Sun Aug  6 12:31:27 2017
New Revision: 310220

URL: http://llvm.org/viewvc/llvm-project?rev=310220&view=rev
Log:
[ScopInfo] Translate Scop::getIdForParam to isl++ [NFC]

Modified:
    polly/trunk/include/polly/ScopInfo.h
    polly/trunk/lib/Analysis/ScopInfo.cpp
    polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
    polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp
    polly/trunk/lib/Support/SCEVAffinator.cpp

Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=310220&r1=310219&r2=310220&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Sun Aug  6 12:31:27 2017
@@ -2419,7 +2419,7 @@ public:
   /// @param Parameter A SCEV that was recognized as a Parameter.
   ///
   /// @return The corresponding isl_id or NULL otherwise.
-  __isl_give isl_id *getIdForParam(const SCEV *Parameter) const;
+  isl::id getIdForParam(const SCEV *Parameter) const;
 
   /// Get the maximum region of this static control part.
   ///

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=310220&r1=310219&r2=310220&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sun Aug  6 12:31:27 2017
@@ -2193,10 +2193,10 @@ void Scop::addParams(const ParameterSetT
   }
 }
 
-__isl_give isl_id *Scop::getIdForParam(const SCEV *Parameter) const {
+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_id_copy(ParameterIds.lookup(Parameter));
+  return isl::manage(isl_id_copy(ParameterIds.lookup(Parameter)));
 }
 
 __isl_give isl_set *
@@ -3903,7 +3903,7 @@ void Scop::addInvariantLoads(ScopStmt &S
         if (!Values.count(AccInst))
           continue;
 
-        if (isl_id *ParamId = getIdForParam(Parameter)) {
+        if (isl_id *ParamId = getIdForParam(Parameter).release()) {
           int Dim = isl_set_find_dim_by_id(DomainCtx, isl_dim_param, ParamId);
           if (Dim >= 0)
             DomainCtx = isl_set_eliminate(DomainCtx, isl_dim_param, Dim, 1);
@@ -4292,7 +4292,7 @@ isl::space Scop::getFullParamSpace() con
 
   unsigned PDim = 0;
   for (const SCEV *Parameter : Parameters) {
-    isl::id Id = isl::manage(getIdForParam(Parameter));
+    isl::id Id = getIdForParam(Parameter);
     Space = Space.set_dim_id(isl::dim::param, PDim++, Id);
   }
 

Modified: polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslNodeBuilder.cpp?rev=310220&r1=310219&r2=310220&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslNodeBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IslNodeBuilder.cpp Sun Aug  6 12:31:27 2017
@@ -1057,7 +1057,7 @@ bool IslNodeBuilder::materializeParamete
 
 bool IslNodeBuilder::materializeParameters() {
   for (const SCEV *Param : S.parameters()) {
-    isl_id *Id = S.getIdForParam(Param);
+    isl_id *Id = S.getIdForParam(Param).release();
     if (!materializeValue(Id))
       return false;
   }
@@ -1344,7 +1344,7 @@ bool IslNodeBuilder::preloadInvariantEqu
   }
 
   if (SE.isSCEVable(AccInstTy)) {
-    isl_id *ParamId = S.getIdForParam(SE.getSCEV(AccInst));
+    isl_id *ParamId = S.getIdForParam(SE.getSCEV(AccInst)).release();
     if (ParamId)
       IDToValue[ParamId] = PreloadVal;
     isl_id_free(ParamId);

Modified: polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp?rev=310220&r1=310219&r2=310220&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp Sun Aug  6 12:31:27 2017
@@ -2597,7 +2597,7 @@ public:
     auto *Zero = isl_ast_expr_from_val(isl_val_zero(S->getIslCtx()));
 
     for (const SCEV *P : S->parameters()) {
-      isl_id *Id = S->getIdForParam(P);
+      isl_id *Id = S->getIdForParam(P).release();
       Names = isl_id_to_ast_expr_set(Names, Id, isl_ast_expr_copy(Zero));
     }
 

Modified: polly/trunk/lib/Support/SCEVAffinator.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/SCEVAffinator.cpp?rev=310220&r1=310219&r2=310220&view=diff
==============================================================================
--- polly/trunk/lib/Support/SCEVAffinator.cpp (original)
+++ polly/trunk/lib/Support/SCEVAffinator.cpp Sun Aug  6 12:31:27 2017
@@ -233,7 +233,7 @@ __isl_give PWACtx SCEVAffinator::visit(c
   // expression, but create a new parameter in the isl_pw_aff. This allows us
   // to treat subexpressions that we cannot translate into an piecewise affine
   // expression, as constant parameters of the piecewise affine expression.
-  if (isl_id *Id = S->getIdForParam(Expr)) {
+  if (isl_id *Id = S->getIdForParam(Expr).release()) {
     isl_space *Space = isl_space_set_alloc(Ctx, 1, NumIterators);
     Space = isl_space_set_dim_id(Space, isl_dim_param, 0, Id);
 




More information about the llvm-commits mailing list