[ScopInfo] Move Scop::getAssumedContext to isl++ [NFC]

llvm-svn: 310228
This commit is contained in:
Tobias Grosser 2017-08-06 21:42:09 +00:00
parent 7c53c0f586
commit e127033f98
4 changed files with 8 additions and 7 deletions

View File

@ -2525,7 +2525,7 @@ public:
/// Get the assumed context for this Scop.
///
/// @return The assumed context of this Scop.
__isl_give isl_set *getAssumedContext() const;
isl::set getAssumedContext() const;
/// Return true if the optimized SCoP can be executed.
///

View File

@ -178,8 +178,8 @@ static void collectInfo(Scop &S, isl_union_map *&Read,
isl_union_map_add_map(StmtSchedule, Stmt.getSchedule().release());
}
StmtSchedule =
isl_union_map_intersect_params(StmtSchedule, S.getAssumedContext());
StmtSchedule = isl_union_map_intersect_params(
StmtSchedule, S.getAssumedContext().release());
TaggedStmtDomain = isl_union_map_domain(StmtSchedule);
ReductionTagMap = isl_union_map_coalesce(ReductionTagMap);

View File

@ -4301,9 +4301,9 @@ isl::space Scop::getFullParamSpace() const {
return Space;
}
__isl_give isl_set *Scop::getAssumedContext() const {
isl::set Scop::getAssumedContext() const {
assert(AssumedContext && "Assumed context not yet built");
return isl_set_copy(AssumedContext);
return isl::manage(isl_set_copy(AssumedContext));
}
bool Scop::isProfitable(bool ScalarsAreUnprofitable) const {
@ -4335,7 +4335,7 @@ bool Scop::isProfitable(bool ScalarsAreUnprofitable) const {
}
bool Scop::hasFeasibleRuntimeContext() const {
auto *PositiveContext = getAssumedContext();
auto *PositiveContext = getAssumedContext().release();
auto *NegativeContext = getInvalidContext();
PositiveContext =
addNonEmptyDomainConstraints(isl::manage(PositiveContext)).release();

View File

@ -345,7 +345,8 @@ IslAst::buildRunCondition(Scop &S, __isl_keep isl_ast_build *Build) {
// The conditions that need to be checked at run-time for this scop are
// available as an isl_set in the runtime check context from which we can
// directly derive a run-time condition.
auto *PosCond = isl_ast_build_expr_from_set(Build, S.getAssumedContext());
auto *PosCond =
isl_ast_build_expr_from_set(Build, S.getAssumedContext().release());
if (S.hasTrivialInvalidContext()) {
RunCondition = PosCond;
} else {