[polly] r332471 - [ScopInfo] Remove usage of isl_set_n_basic_set()
Philip Pfaffe via llvm-commits
llvm-commits at lists.llvm.org
Wed May 16 07:05:03 PDT 2018
Author: pfaffe
Date: Wed May 16 07:05:03 2018
New Revision: 332471
URL: http://llvm.org/viewvc/llvm-project?rev=332471&view=rev
Log:
[ScopInfo] Remove usage of isl_set_n_basic_set()
Summary: This patch aims to remove the usage of old C-styled isl functions (in this case `isl_set_n_basic_set()`) in favor of new C++ isl interface based methods in `ScopInfo.cpp`.
Patch by Sahil Yerawar
Differential Revision: https://reviews.llvm.org/D46935
Modified:
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=332471&r1=332470&r2=332471&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed May 16 07:05:03 2018
@@ -276,7 +276,7 @@ static isl::set addRangeBoundsToSet(isl:
if (Range.isFullSet())
return S;
- if (isl_set_n_basic_set(S.get()) > MaxDisjunctsInContext)
+ if (S.n_basic_set() > MaxDisjunctsInContext)
return S;
// In case of signed wrapping, we can refine the set of valid values by
@@ -2312,7 +2312,7 @@ buildMinMaxAccess(isl::set Set, Scop::Mi
Set = Set.remove_divs();
polly::simplify(Set);
- if (isl_set_n_basic_set(Set.get()) > RunTimeChecksMaxAccessDisjuncts)
+ if (Set.n_basic_set() > RunTimeChecksMaxAccessDisjuncts)
Set = Set.simple_hull();
// Restrict the number of parameters involved in the access as the lexmin/
@@ -2652,16 +2652,15 @@ bool Scop::propagateInvalidStmtDomains(
Loop *SuccBBLoop = getFirstNonBoxedLoopFor(SuccBB, LI, getBoxedLoops());
- auto *AdjustedInvalidDomain = adjustDomainDimensions(
- *this, InvalidDomain.copy(), BBLoop, SuccBBLoop);
+ auto AdjustedInvalidDomain = isl::manage(adjustDomainDimensions(
+ *this, InvalidDomain.copy(), BBLoop, SuccBBLoop));
- auto *SuccInvalidDomain = InvalidDomainMap[SuccBB].copy();
- SuccInvalidDomain =
- isl_set_union(SuccInvalidDomain, AdjustedInvalidDomain);
- SuccInvalidDomain = isl_set_coalesce(SuccInvalidDomain);
- unsigned NumConjucts = isl_set_n_basic_set(SuccInvalidDomain);
+ isl::set SuccInvalidDomain = InvalidDomainMap[SuccBB];
+ SuccInvalidDomain = SuccInvalidDomain.unite(AdjustedInvalidDomain);
+ SuccInvalidDomain = SuccInvalidDomain.coalesce();
+ unsigned NumConjucts = SuccInvalidDomain.n_basic_set();
- InvalidDomainMap[SuccBB] = isl::manage(SuccInvalidDomain);
+ InvalidDomainMap[SuccBB] = SuccInvalidDomain;
// Check if the maximal number of domain disjunctions was reached.
// In case this happens we will bail.
@@ -2839,7 +2838,7 @@ bool Scop::buildDomainsWithBranchConstra
// Check if the maximal number of domain disjunctions was reached.
// In case this happens we will clean up and bail.
- if (isl_set_n_basic_set(SuccDomain.get()) < MaxDisjunctsInDomain)
+ if (SuccDomain.n_basic_set() < MaxDisjunctsInDomain)
continue;
invalidate(COMPLEXITY, DebugLoc());
@@ -3686,7 +3685,7 @@ void Scop::addInvariantLoads(ScopStmt &S
isl::set DomainCtx = Stmt.getDomain().params();
DomainCtx = DomainCtx.subtract(StmtInvalidCtx);
- if (isl_set_n_basic_set(DomainCtx.get()) >= MaxDisjunctsInDomain) {
+ if (DomainCtx.n_basic_set() >= MaxDisjunctsInDomain) {
auto *AccInst = InvMAs.front().MA->getAccessInstruction();
invalidate(COMPLEXITY, AccInst->getDebugLoc(), AccInst->getParent());
return;
@@ -3878,8 +3877,7 @@ isl::set Scop::getNonHoistableCtx(Memory
return WrittenCtx;
WrittenCtx = WrittenCtx.remove_divs();
- bool TooComplex =
- isl_set_n_basic_set(WrittenCtx.get()) >= MaxDisjunctsInDomain;
+ bool TooComplex = WrittenCtx.n_basic_set() >= MaxDisjunctsInDomain;
if (TooComplex || !isRequiredInvariantLoad(LI))
return nullptr;
More information about the llvm-commits
mailing list