[polly] r310214 - [ScopInfo] Move getPredecessorDomainConstraints to isl++ [NFC]
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 6 10:31:39 PDT 2017
Author: grosser
Date: Sun Aug 6 10:31:38 2017
New Revision: 310214
URL: http://llvm.org/viewvc/llvm-project?rev=310214&view=rev
Log:
[ScopInfo] Move getPredecessorDomainConstraints to isl++ [NFC]
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=310214&r1=310213&r2=310214&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Sun Aug 6 10:31:38 2017
@@ -1954,9 +1954,8 @@ private:
/// @param LI The LoopInfo for the current function.
///
/// @returns The domain under which @p BB is executed.
- __isl_give isl_set *
- getPredecessorDomainConstraints(BasicBlock *BB, __isl_keep isl_set *Domain,
- DominatorTree &DT, LoopInfo &LI);
+ isl::set getPredecessorDomainConstraints(BasicBlock *BB, isl::set Domain,
+ DominatorTree &DT, LoopInfo &LI);
/// Add loop carried constraints to the header block of the loop @p L.
///
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=310214&r1=310213&r2=310214&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sun Aug 6 10:31:38 2017
@@ -3050,13 +3050,12 @@ bool Scop::buildDomainsWithBranchConstra
return true;
}
-__isl_give isl_set *
-Scop::getPredecessorDomainConstraints(BasicBlock *BB,
- __isl_keep isl_set *Domain,
- DominatorTree &DT, LoopInfo &LI) {
+isl::set Scop::getPredecessorDomainConstraints(BasicBlock *BB, isl::set Domain,
+ DominatorTree &DT,
+ LoopInfo &LI) {
// If @p BB is the ScopEntry we are done
if (R.getEntry() == BB)
- return isl_set_universe(isl_set_get_space(Domain));
+ return isl::set::universe(Domain.get_space());
// The region info of this function.
auto &RI = *R.getRegionInfo();
@@ -3065,7 +3064,7 @@ Scop::getPredecessorDomainConstraints(Ba
// A domain to collect all predecessor domains, thus all conditions under
// which the block is executed. To this end we start with the empty domain.
- isl_set *PredDom = isl_set_empty(isl_set_get_space(Domain));
+ isl::set PredDom = isl::set::empty(Domain.get_space());
// Set of regions of which the entry block domain has been propagated to BB.
// all predecessors inside any of the regions can be skipped.
@@ -3101,7 +3100,7 @@ Scop::getPredecessorDomainConstraints(Ba
PredBBDom = adjustDomainDimensions(*this, PredBBDom, PredBBLoop, BBLoop);
- PredDom = isl_set_union(PredDom, PredBBDom);
+ PredDom = PredDom.unite(isl::manage(PredBBDom));
}
return PredDom;
@@ -3138,8 +3137,7 @@ bool Scop::propagateDomainConstraints(
assert(Domain);
// Under the union of all predecessor conditions we can reach this block.
- isl::set PredDom =
- isl::manage(getPredecessorDomainConstraints(BB, Domain.get(), DT, LI));
+ isl::set PredDom = getPredecessorDomainConstraints(BB, Domain, DT, LI);
Domain = Domain.intersect(PredDom).coalesce();
Domain = Domain.align_params(isl::manage(getParamSpace()));
More information about the llvm-commits
mailing list