[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 llvm-svn: 332471
This commit is contained in:
parent
64144eb194
commit
9375d57202
|
@ -276,7 +276,7 @@ static isl::set addRangeBoundsToSet(isl::set S, const ConstantRange &Range,
|
||||||
if (Range.isFullSet())
|
if (Range.isFullSet())
|
||||||
return S;
|
return S;
|
||||||
|
|
||||||
if (isl_set_n_basic_set(S.get()) > MaxDisjunctsInContext)
|
if (S.n_basic_set() > MaxDisjunctsInContext)
|
||||||
return S;
|
return S;
|
||||||
|
|
||||||
// In case of signed wrapping, we can refine the set of valid values by
|
// In case of signed wrapping, we can refine the set of valid values by
|
||||||
|
@ -2312,7 +2312,7 @@ buildMinMaxAccess(isl::set Set, Scop::MinMaxVectorTy &MinMaxAccesses, Scop &S) {
|
||||||
Set = Set.remove_divs();
|
Set = Set.remove_divs();
|
||||||
polly::simplify(Set);
|
polly::simplify(Set);
|
||||||
|
|
||||||
if (isl_set_n_basic_set(Set.get()) > RunTimeChecksMaxAccessDisjuncts)
|
if (Set.n_basic_set() > RunTimeChecksMaxAccessDisjuncts)
|
||||||
Set = Set.simple_hull();
|
Set = Set.simple_hull();
|
||||||
|
|
||||||
// Restrict the number of parameters involved in the access as the lexmin/
|
// 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());
|
Loop *SuccBBLoop = getFirstNonBoxedLoopFor(SuccBB, LI, getBoxedLoops());
|
||||||
|
|
||||||
auto *AdjustedInvalidDomain = adjustDomainDimensions(
|
auto AdjustedInvalidDomain = isl::manage(adjustDomainDimensions(
|
||||||
*this, InvalidDomain.copy(), BBLoop, SuccBBLoop);
|
*this, InvalidDomain.copy(), BBLoop, SuccBBLoop));
|
||||||
|
|
||||||
auto *SuccInvalidDomain = InvalidDomainMap[SuccBB].copy();
|
isl::set SuccInvalidDomain = InvalidDomainMap[SuccBB];
|
||||||
SuccInvalidDomain =
|
SuccInvalidDomain = SuccInvalidDomain.unite(AdjustedInvalidDomain);
|
||||||
isl_set_union(SuccInvalidDomain, AdjustedInvalidDomain);
|
SuccInvalidDomain = SuccInvalidDomain.coalesce();
|
||||||
SuccInvalidDomain = isl_set_coalesce(SuccInvalidDomain);
|
unsigned NumConjucts = SuccInvalidDomain.n_basic_set();
|
||||||
unsigned NumConjucts = isl_set_n_basic_set(SuccInvalidDomain);
|
|
||||||
|
|
||||||
InvalidDomainMap[SuccBB] = isl::manage(SuccInvalidDomain);
|
InvalidDomainMap[SuccBB] = SuccInvalidDomain;
|
||||||
|
|
||||||
// Check if the maximal number of domain disjunctions was reached.
|
// Check if the maximal number of domain disjunctions was reached.
|
||||||
// In case this happens we will bail.
|
// In case this happens we will bail.
|
||||||
|
@ -2839,7 +2838,7 @@ bool Scop::buildDomainsWithBranchConstraints(
|
||||||
|
|
||||||
// Check if the maximal number of domain disjunctions was reached.
|
// Check if the maximal number of domain disjunctions was reached.
|
||||||
// In case this happens we will clean up and bail.
|
// 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;
|
continue;
|
||||||
|
|
||||||
invalidate(COMPLEXITY, DebugLoc());
|
invalidate(COMPLEXITY, DebugLoc());
|
||||||
|
@ -3686,7 +3685,7 @@ void Scop::addInvariantLoads(ScopStmt &Stmt, InvariantAccessesTy &InvMAs) {
|
||||||
isl::set DomainCtx = Stmt.getDomain().params();
|
isl::set DomainCtx = Stmt.getDomain().params();
|
||||||
DomainCtx = DomainCtx.subtract(StmtInvalidCtx);
|
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();
|
auto *AccInst = InvMAs.front().MA->getAccessInstruction();
|
||||||
invalidate(COMPLEXITY, AccInst->getDebugLoc(), AccInst->getParent());
|
invalidate(COMPLEXITY, AccInst->getDebugLoc(), AccInst->getParent());
|
||||||
return;
|
return;
|
||||||
|
@ -3878,8 +3877,7 @@ isl::set Scop::getNonHoistableCtx(MemoryAccess *Access, isl::union_map Writes) {
|
||||||
return WrittenCtx;
|
return WrittenCtx;
|
||||||
|
|
||||||
WrittenCtx = WrittenCtx.remove_divs();
|
WrittenCtx = WrittenCtx.remove_divs();
|
||||||
bool TooComplex =
|
bool TooComplex = WrittenCtx.n_basic_set() >= MaxDisjunctsInDomain;
|
||||||
isl_set_n_basic_set(WrittenCtx.get()) >= MaxDisjunctsInDomain;
|
|
||||||
if (TooComplex || !isRequiredInvariantLoad(LI))
|
if (TooComplex || !isRequiredInvariantLoad(LI))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue