forked from OSchip/llvm-project
[Polly][Isl] Use isl::union_set::unite() instead of isl::union_set::add_set(). NFC
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.
Changes made:
- Use `isl::union_set::unite()` instead of `isl::union_set::add_set()`
- `isl-noexceptions.h` has been generated by this 390c44982b
Depends on D104994
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D105444
This commit is contained in:
parent
2c03d92ee6
commit
b55aedd0b8
|
@ -192,7 +192,7 @@ static void collectInfo(Scop &S, isl_union_map *&Read,
|
|||
static void fixSetToZero(isl::set Zero, isl::union_set *User) {
|
||||
for (auto i : seq<isl_size>(0, Zero.tuple_dim()))
|
||||
Zero = Zero.fix_si(isl::dim::set, i, 0);
|
||||
*User = User->add_set(Zero);
|
||||
*User = User->unite(Zero);
|
||||
}
|
||||
|
||||
/// Compute the privatization dependences for a given dependency @p Map
|
||||
|
|
|
@ -3699,7 +3699,6 @@ public:
|
|||
inline ctx get_ctx() const;
|
||||
inline void dump() const;
|
||||
|
||||
inline union_set add_set(set set) const;
|
||||
inline union_set affine_hull() const;
|
||||
inline union_set align_params(space model) const;
|
||||
inline union_set apply(union_map umap) const;
|
||||
|
@ -19740,12 +19739,6 @@ void union_set::dump() const {
|
|||
}
|
||||
|
||||
|
||||
union_set union_set::add_set(set set) const
|
||||
{
|
||||
auto res = isl_union_set_add_set(copy(), set.release());
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
union_set union_set::affine_hull() const
|
||||
{
|
||||
auto res = isl_union_set_affine_hull(copy());
|
||||
|
|
|
@ -229,7 +229,7 @@ isl::union_set polly::shiftDim(isl::union_set USet, int Pos, int Amount) {
|
|||
isl::union_set Result = isl::union_set::empty(USet.get_space());
|
||||
for (isl::set Set : USet.get_set_list()) {
|
||||
isl::set Shifted = shiftDim(Set, Pos, Amount);
|
||||
Result = Result.add_set(Shifted);
|
||||
Result = Result.unite(Shifted);
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
@ -827,7 +827,7 @@ static isl::union_set expand(const isl::union_set &USet) {
|
|||
isl::union_set Expanded = isl::union_set::empty(USet.get_space());
|
||||
for (isl::set Set : USet.get_set_list()) {
|
||||
isl::set SetExpanded = expand(Set);
|
||||
Expanded = Expanded.add_set(SetExpanded);
|
||||
Expanded = Expanded.unite(SetExpanded);
|
||||
}
|
||||
return Expanded;
|
||||
}
|
||||
|
|
|
@ -624,7 +624,7 @@ private:
|
|||
|
||||
// Find all uses.
|
||||
for (auto *MA : S->getValueUses(SAI))
|
||||
Reads = Reads.add_set(getDomainFor(MA));
|
||||
Reads = Reads.unite(getDomainFor(MA));
|
||||
|
||||
// { DomainRead[] -> Scatter[] }
|
||||
auto ReadSchedule = getScatterFor(Reads);
|
||||
|
@ -885,7 +885,7 @@ private:
|
|||
auto UniverseWritesDom = isl::union_set::empty(ParamSpace);
|
||||
|
||||
for (auto *MA : S->getPHIIncomings(SAI))
|
||||
UniverseWritesDom = UniverseWritesDom.add_set(getDomainFor(MA));
|
||||
UniverseWritesDom = UniverseWritesDom.unite(getDomainFor(MA));
|
||||
|
||||
auto RelevantWritesTarget = WritesTarget;
|
||||
if (DelicmOverapproximateWrites)
|
||||
|
|
|
@ -189,7 +189,7 @@ bool MaximalStaticExpander::isExpandable(
|
|||
for (auto Write : Writes) {
|
||||
auto MapDeps = filterDependences(S, Dependences, Write);
|
||||
for (isl::map Map : MapDeps.get_map_list())
|
||||
WriteDomain = WriteDomain.add_set(Map.range());
|
||||
WriteDomain = WriteDomain.unite(Map.range());
|
||||
}
|
||||
|
||||
// For now, read from original scalar is not possible.
|
||||
|
|
|
@ -336,7 +336,7 @@ void ZoneAlgorithm::collectIncompatibleElts(ScopStmt *Stmt,
|
|||
// To avoid solving any ILP problems, always add entire arrays instead of
|
||||
// just the elements that are accessed.
|
||||
auto ArrayElts = isl::set::universe(AccRelMap.get_space().range());
|
||||
AllElts = AllElts.add_set(ArrayElts);
|
||||
AllElts = AllElts.unite(ArrayElts);
|
||||
|
||||
if (MA->isRead()) {
|
||||
// Reject load after store to same location.
|
||||
|
@ -350,7 +350,7 @@ void ZoneAlgorithm::collectIncompatibleElts(ScopStmt *Stmt,
|
|||
R << ", loading: " << AccRel << ")";
|
||||
S->getFunction().getContext().diagnose(R);
|
||||
|
||||
IncompatibleElts = IncompatibleElts.add_set(ArrayElts);
|
||||
IncompatibleElts = IncompatibleElts.unite(ArrayElts);
|
||||
}
|
||||
|
||||
Loads = Loads.unite(AccRel);
|
||||
|
@ -367,7 +367,7 @@ void ZoneAlgorithm::collectIncompatibleElts(ScopStmt *Stmt,
|
|||
R << "store is in a non-affine subregion";
|
||||
S->getFunction().getContext().diagnose(R);
|
||||
|
||||
IncompatibleElts = IncompatibleElts.add_set(ArrayElts);
|
||||
IncompatibleElts = IncompatibleElts.unite(ArrayElts);
|
||||
}
|
||||
|
||||
// Do not allow more than one store to the same location.
|
||||
|
@ -380,7 +380,7 @@ void ZoneAlgorithm::collectIncompatibleElts(ScopStmt *Stmt,
|
|||
R << ", storing: " << AccRel << ")";
|
||||
S->getFunction().getContext().diagnose(R);
|
||||
|
||||
IncompatibleElts = IncompatibleElts.add_set(ArrayElts);
|
||||
IncompatibleElts = IncompatibleElts.unite(ArrayElts);
|
||||
}
|
||||
|
||||
Stores = Stores.unite(AccRel);
|
||||
|
|
|
@ -27,7 +27,7 @@ isl::union_set unionSpace(const isl::union_set &USet) {
|
|||
for (isl::set Set : USet.get_set_list()) {
|
||||
isl::space Space = Set.get_space();
|
||||
isl::set Universe = isl::set::universe(Space);
|
||||
Result = Result.add_set(Universe);
|
||||
Result = Result.unite(Universe);
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ bool checkIsConflictingNonsymmetricCommon(
|
|||
auto NewSpace = isl::space(Ctx, 0, 1);
|
||||
NewSpace = NewSpace.set_tuple_id(isl::dim::set, NewId);
|
||||
auto NewSet = isl::set::universe(NewSpace);
|
||||
Universe = Universe.add_set(NewSet);
|
||||
Universe = Universe.unite(NewSet);
|
||||
|
||||
// Using the universe, fill missing data.
|
||||
isl::union_set ExistingOccupied;
|
||||
|
|
Loading…
Reference in New Issue