[polly] r331129 - Remove another set or release() calls

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 28 17:57:39 PDT 2018


Author: grosser
Date: Sat Apr 28 17:57:38 2018
New Revision: 331129

URL: http://llvm.org/viewvc/llvm-project?rev=331129&view=rev
Log:
Remove another set or release() calls

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

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=331129&r1=331128&r2=331129&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sat Apr 28 17:57:38 2018
@@ -1419,7 +1419,7 @@ getPwAff(Scop &S, BasicBlock *BB,
          bool NonNegative = false) {
   PWACtx PWAC = S.getPwAff(E, BB, NonNegative);
   InvalidDomainMap[BB] = InvalidDomainMap[BB].unite(PWAC.second);
-  return PWAC.first.take();
+  return PWAC.first.release();
 }
 
 /// Build the conditions sets for the switch @p SI in the @p Domain.

Modified: polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp?rev=331129&r1=331128&r2=331129&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/PPCGCodeGeneration.cpp Sat Apr 28 17:57:38 2018
@@ -2730,8 +2730,8 @@ public:
     PPCGScop->tagged_must_writes = getTaggedMustWrites();
     PPCGScop->must_writes = S->getMustWrites().release();
     PPCGScop->live_out = nullptr;
-    PPCGScop->tagged_must_kills = KillsInfo.TaggedMustKills.take();
-    PPCGScop->must_kills = KillsInfo.MustKills.take();
+    PPCGScop->tagged_must_kills = KillsInfo.TaggedMustKills.release();
+    PPCGScop->must_kills = KillsInfo.MustKills.release();
 
     PPCGScop->tagger = nullptr;
     PPCGScop->independence =
@@ -2747,7 +2747,7 @@ public:
     // If we have something non-trivial to kill, add it to the schedule
     if (KillsInfo.KillsSchedule.get())
       PPCGScop->schedule = isl_schedule_sequence(
-          PPCGScop->schedule, KillsInfo.KillsSchedule.take());
+          PPCGScop->schedule, KillsInfo.KillsSchedule.release());
 
     PPCGScop->names = getNames();
     PPCGScop->pet = nullptr;

Modified: polly/trunk/lib/Support/SCEVAffinator.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/SCEVAffinator.cpp?rev=331129&r1=331128&r2=331129&view=diff
==============================================================================
--- polly/trunk/lib/Support/SCEVAffinator.cpp (original)
+++ polly/trunk/lib/Support/SCEVAffinator.cpp Sat Apr 28 17:57:38 2018
@@ -69,7 +69,7 @@ static SCEV::NoWrapFlags getNoWrapFlags(
 static PWACtx combine(PWACtx PWAC0, PWACtx PWAC1,
                       __isl_give isl_pw_aff *(Fn)(__isl_take isl_pw_aff *,
                                                   __isl_take isl_pw_aff *)) {
-  PWAC0.first = isl::manage(Fn(PWAC0.first.take(), PWAC1.first.take()));
+  PWAC0.first = isl::manage(Fn(PWAC0.first.release(), PWAC1.first.release()));
   PWAC0.second = PWAC0.second.unite(PWAC1.second);
   return PWAC0;
 }
@@ -94,14 +94,14 @@ void SCEVAffinator::interpretAsUnsigned(
       isl_pw_aff_intersect_domain(PWAC.first.copy(), isl_set_copy(NonNegDom));
   auto *ExpPWA = getWidthExpValOnDomain(Width, isl_set_complement(NonNegDom));
   PWAC.first = isl::manage(isl_pw_aff_union_add(
-      NonNegPWA, isl_pw_aff_add(PWAC.first.take(), ExpPWA)));
+      NonNegPWA, isl_pw_aff_add(PWAC.first.release(), ExpPWA)));
 }
 
 void SCEVAffinator::takeNonNegativeAssumption(PWACtx &PWAC) {
   auto *NegPWA = isl_pw_aff_neg(PWAC.first.copy());
   auto *NegDom = isl_pw_aff_pos_set(NegPWA);
   PWAC.second =
-      isl::manage(isl_set_union(PWAC.second.take(), isl_set_copy(NegDom)));
+      isl::manage(isl_set_union(PWAC.second.release(), isl_set_copy(NegDom)));
   auto *Restriction = BB ? NegDom : isl_set_params(NegDom);
   auto DL = BB ? BB->getTerminator()->getDebugLoc() : DebugLoc();
   S->recordAssumption(UNSIGNED, isl::manage(Restriction), DL, AS_RESTRICTION,
@@ -161,7 +161,7 @@ isl::pw_aff SCEVAffinator::addModuloSema
 
   isl::set Domain = PWA.domain();
   isl::pw_aff AddPW =
-      isl::manage(getWidthExpValOnDomain(Width - 1, Domain.take()));
+      isl::manage(getWidthExpValOnDomain(Width - 1, Domain.release()));
 
   return PWA.add(AddPW).mod(ModVal).sub(AddPW);
 }
@@ -276,7 +276,7 @@ PWACtx SCEVAffinator::visitTruncateExpr(
   if (computeModuloForExpr(Expr))
     return OpPWAC;
 
-  auto *Dom = OpPWAC.first.domain().take();
+  auto *Dom = OpPWAC.first.domain().release();
   auto *ExpPWA = getWidthExpValOnDomain(Width - 1, Dom);
   auto *GreaterDom =
       isl_pw_aff_ge_set(OpPWAC.first.copy(), isl_pw_aff_copy(ExpPWA));
@@ -462,7 +462,7 @@ PWACtx SCEVAffinator::visitUDivExpr(cons
     // piece-wise defined value described for zero-extends as we already know
     // the actual value of the constant divisor.
     unsigned Width = TD.getTypeSizeInBits(Expr->getType());
-    auto *DivisorDom = DivisorPWAC.first.domain().take();
+    auto *DivisorDom = DivisorPWAC.first.domain().release();
     auto *WidthExpPWA = getWidthExpValOnDomain(Width, DivisorDom);
     DivisorPWAC.first = DivisorPWAC.first.add(isl::manage(WidthExpPWA));
   }




More information about the llvm-commits mailing list