diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index 517d892fcf55..9300150fd459 100644 --- a/polly/include/polly/ScopInfo.h +++ b/polly/include/polly/ScopInfo.h @@ -526,12 +526,9 @@ private: /// Build the statement. //@{ __isl_give isl_set *buildConditionSet(const Comparison &Cmp); - __isl_give isl_set *addConditionsToDomain(__isl_take isl_set *Domain, - TempScop &tempScop, - const Region &CurRegion); - __isl_give isl_set *addLoopBoundsToDomain(__isl_take isl_set *Domain, - TempScop &tempScop); - __isl_give isl_set *buildDomain(TempScop &tempScop, const Region &CurRegion); + void addConditionsToDomain(TempScop &tempScop, const Region &CurRegion); + void addLoopBoundsToDomain(TempScop &tempScop); + void buildDomain(TempScop &tempScop, const Region &CurRegion); /// @brief Create the accesses for instructions in @p Block. /// diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index c7a92f5a9060..6e113b134a43 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -743,8 +743,7 @@ __isl_give isl_set *ScopStmt::buildConditionSet(const Comparison &Comp) { } } -__isl_give isl_set *ScopStmt::addLoopBoundsToDomain(__isl_take isl_set *Domain, - TempScop &tempScop) { +void ScopStmt::addLoopBoundsToDomain(TempScop &tempScop) { isl_space *Space; isl_local_space *LocalSpace; @@ -770,12 +769,10 @@ __isl_give isl_set *ScopStmt::addLoopBoundsToDomain(__isl_take isl_set *Domain, } isl_local_space_free(LocalSpace); - return Domain; } -__isl_give isl_set *ScopStmt::addConditionsToDomain(__isl_take isl_set *Domain, - TempScop &tempScop, - const Region &CurRegion) { +void ScopStmt::addConditionsToDomain(TempScop &tempScop, + const Region &CurRegion) { const Region *TopRegion = tempScop.getMaxRegion().getParent(), *CurrentRegion = &CurRegion; const BasicBlock *BranchingBB = BB ? BB : R->getEntry(); @@ -791,14 +788,10 @@ __isl_give isl_set *ScopStmt::addConditionsToDomain(__isl_take isl_set *Domain, BranchingBB = CurrentRegion->getEntry(); CurrentRegion = CurrentRegion->getParent(); } while (TopRegion != CurrentRegion); - - return Domain; } -__isl_give isl_set *ScopStmt::buildDomain(TempScop &tempScop, - const Region &CurRegion) { +void ScopStmt::buildDomain(TempScop &tempScop, const Region &CurRegion) { isl_space *Space; - isl_set *Domain; isl_id *Id; Space = isl_space_set_alloc(getIslCtx(), 0, getNumIterators()); @@ -806,11 +799,9 @@ __isl_give isl_set *ScopStmt::buildDomain(TempScop &tempScop, Id = isl_id_alloc(getIslCtx(), getBaseName(), this); Domain = isl_set_universe(Space); - Domain = addLoopBoundsToDomain(Domain, tempScop); - Domain = addConditionsToDomain(Domain, tempScop, CurRegion); + addLoopBoundsToDomain(tempScop); + addConditionsToDomain(tempScop, CurRegion); Domain = isl_set_set_tuple_id(Domain, Id); - - return Domain; } void ScopStmt::deriveAssumptionsFromGEP(GetElementPtrInst *GEP) { @@ -878,7 +869,7 @@ ScopStmt::ScopStmt(Scop &parent, TempScop &tempScop, const Region &CurRegion, BaseName = getIslCompatibleName("Stmt_", R.getNameStr(), ""); - Domain = buildDomain(tempScop, CurRegion); + buildDomain(tempScop, CurRegion); BasicBlock *EntryBB = R.getEntry(); for (BasicBlock *Block : R.blocks()) { @@ -898,7 +889,7 @@ ScopStmt::ScopStmt(Scop &parent, TempScop &tempScop, const Region &CurRegion, BaseName = getIslCompatibleName("Stmt_", &bb, ""); - Domain = buildDomain(tempScop, CurRegion); + buildDomain(tempScop, CurRegion); buildAccesses(tempScop, BB); deriveAssumptions(BB); checkForReductions(); diff --git a/polly/test/ScopInfo/user_context.ll b/polly/test/ScopInfo/user_context.ll index 49d2aeba67db..458e6a110c83 100644 --- a/polly/test/ScopInfo/user_context.ll +++ b/polly/test/ScopInfo/user_context.ll @@ -10,7 +10,11 @@ ; } ; CHECK: Context: -; CHECK: [N] -> { : N >= -9223372036854775808 and N <= 9223372036854775807 } +; CHECK: [N] -> { : +; CHECK-DAG: N >= -9223372036854775808 +; CHECK-DAG: and +; CHECK-DAG: N <= 9223372036854775807 +; CHECK: } ; CTX: Context: ; CTX: [N] -> { : N = 1024 }