summaryrefslogtreecommitdiffstats
path: root/polly/lib/Transform
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2018-04-29 00:28:26 +0000
committerTobias Grosser <tobias@grosser.es>2018-04-29 00:28:26 +0000
commitd3d3d6b75d43c52eaa2bcbe5bab7be10ff329695 (patch)
tree6c3f8072732812e49058602b1c7acee86a68e241 /polly/lib/Transform
parent72018edae7ffdfea01d1ca288954a22feee38f31 (diff)
downloadbcm5719-llvm-d3d3d6b75d43c52eaa2bcbe5bab7be10ff329695.tar.gz
bcm5719-llvm-d3d3d6b75d43c52eaa2bcbe5bab7be10ff329695.zip
Remove the last uses of isl::give and isl::take
llvm-svn: 331126
Diffstat (limited to 'polly/lib/Transform')
-rw-r--r--polly/lib/Transform/DeLICM.cpp2
-rw-r--r--polly/lib/Transform/MaximalStaticExpansion.cpp2
-rw-r--r--polly/lib/Transform/ScheduleOptimizer.cpp21
-rw-r--r--polly/lib/Transform/ZoneAlgo.cpp14
4 files changed, 18 insertions, 21 deletions
diff --git a/polly/lib/Transform/DeLICM.cpp b/polly/lib/Transform/DeLICM.cpp
index 08d6fae968a..600e4a88de7 100644
--- a/polly/lib/Transform/DeLICM.cpp
+++ b/polly/lib/Transform/DeLICM.cpp
@@ -768,7 +768,7 @@ private:
auto NewAccRel = UseTarget.intersect_domain(Domain);
simplify(NewAccRel);
- assert(isl_union_map_n_map(NewAccRel.keep()) == 1);
+ assert(isl_union_map_n_map(NewAccRel.get()) == 1);
MA->setNewAccessRelation(isl::map::from_union_map(NewAccRel));
}
diff --git a/polly/lib/Transform/MaximalStaticExpansion.cpp b/polly/lib/Transform/MaximalStaticExpansion.cpp
index be3a84e302c..44bc6c5efb0 100644
--- a/polly/lib/Transform/MaximalStaticExpansion.cpp
+++ b/polly/lib/Transform/MaximalStaticExpansion.cpp
@@ -160,7 +160,7 @@ isl::union_map MaximalStaticExpander::filterDependences(
auto NewMap = Map.factor_domain();
auto NewMapDomainId = NewMap.domain().get_tuple_id();
- if (AccessDomainId.keep() != NewMapDomainId.keep())
+ if (AccessDomainId.get() != NewMapDomainId.get())
return isl::stat::ok;
// Add the corresponding map to MapDependences.
diff --git a/polly/lib/Transform/ScheduleOptimizer.cpp b/polly/lib/Transform/ScheduleOptimizer.cpp
index b4257af9ecb..4f0c81edfde 100644
--- a/polly/lib/Transform/ScheduleOptimizer.cpp
+++ b/polly/lib/Transform/ScheduleOptimizer.cpp
@@ -470,10 +470,10 @@ isl::schedule_node ScheduleTreeOptimizer::applyRegisterTiling(
}
static bool isSimpleInnermostBand(const isl::schedule_node &Node) {
- assert(isl_schedule_node_get_type(Node.keep()) == isl_schedule_node_band);
- assert(isl_schedule_node_n_children(Node.keep()) == 1);
+ assert(isl_schedule_node_get_type(Node.get()) == isl_schedule_node_band);
+ assert(isl_schedule_node_n_children(Node.get()) == 1);
- auto ChildType = isl_schedule_node_get_type(Node.child(0).keep());
+ auto ChildType = isl_schedule_node_get_type(Node.child(0).get());
if (ChildType == isl_schedule_node_leaf)
return true;
@@ -483,12 +483,12 @@ static bool isSimpleInnermostBand(const isl::schedule_node &Node) {
auto Sequence = Node.child(0);
- for (int c = 0, nc = isl_schedule_node_n_children(Sequence.keep()); c < nc;
+ for (int c = 0, nc = isl_schedule_node_n_children(Sequence.get()); c < nc;
++c) {
auto Child = Sequence.child(c);
- if (isl_schedule_node_get_type(Child.keep()) != isl_schedule_node_filter)
+ if (isl_schedule_node_get_type(Child.get()) != isl_schedule_node_filter)
return false;
- if (isl_schedule_node_get_type(Child.child(0).keep()) !=
+ if (isl_schedule_node_get_type(Child.child(0).get()) !=
isl_schedule_node_leaf)
return false;
}
@@ -1253,15 +1253,14 @@ static isl::schedule_node markLoopVectorizerDisabled(isl::schedule_node Node) {
/// @return The modified schedule node.
static isl::schedule_node
getBandNodeWithOriginDimOrder(isl::schedule_node Node) {
- assert(isl_schedule_node_get_type(Node.keep()) == isl_schedule_node_band);
- if (isl_schedule_node_get_type(Node.child(0).keep()) !=
- isl_schedule_node_leaf)
+ assert(isl_schedule_node_get_type(Node.get()) == isl_schedule_node_band);
+ if (isl_schedule_node_get_type(Node.child(0).get()) != isl_schedule_node_leaf)
return Node;
auto Domain = Node.get_universe_domain();
- assert(isl_union_set_n_set(Domain.keep()) == 1);
+ assert(isl_union_set_n_set(Domain.get()) == 1);
if (Node.get_schedule_depth() != 0 ||
(isl::set(Domain).dim(isl::dim::set) !=
- isl_schedule_node_band_n_member(Node.keep())))
+ isl_schedule_node_band_n_member(Node.get())))
return Node;
Node = isl::manage(isl_schedule_node_delete(Node.copy()));
auto PartialSchedulePwAff = Domain.identity_union_pw_multi_aff();
diff --git a/polly/lib/Transform/ZoneAlgo.cpp b/polly/lib/Transform/ZoneAlgo.cpp
index c9bd003d20a..3770953b1a5 100644
--- a/polly/lib/Transform/ZoneAlgo.cpp
+++ b/polly/lib/Transform/ZoneAlgo.cpp
@@ -337,7 +337,7 @@ void ZoneAlgorithm::collectIncompatibleElts(ScopStmt *Stmt,
if (MA->isRead()) {
// Reject load after store to same location.
- if (!isl_union_map_is_disjoint(Stores.keep(), AccRel.keep())) {
+ if (!Stores.is_disjoint(AccRel)) {
DEBUG(dbgs() << "Load after store of same element in same statement\n");
OptimizationRemarkMissed R(PassName, "LoadAfterStore",
MA->getAccessInstruction());
@@ -356,8 +356,7 @@ void ZoneAlgorithm::collectIncompatibleElts(ScopStmt *Stmt,
// In region statements the order is less clear, eg. the load and store
// might be in a boxed loop.
- if (Stmt->isRegionStmt() &&
- !isl_union_map_is_disjoint(Loads.keep(), AccRel.keep())) {
+ if (Stmt->isRegionStmt() && !Loads.is_disjoint(AccRel)) {
DEBUG(dbgs() << "WRITE in non-affine subregion not supported\n");
OptimizationRemarkMissed R(PassName, "StoreInSubregion",
MA->getAccessInstruction());
@@ -368,8 +367,7 @@ void ZoneAlgorithm::collectIncompatibleElts(ScopStmt *Stmt,
}
// Do not allow more than one store to the same location.
- if (!isl_union_map_is_disjoint(Stores.keep(), AccRel.keep()) &&
- !onlySameValueWrites(Stmt)) {
+ if (!Stores.is_disjoint(AccRel) && !onlySameValueWrites(Stmt)) {
DEBUG(dbgs() << "WRITE after WRITE to same element\n");
OptimizationRemarkMissed R(PassName, "StoreAfterStore",
MA->getAccessInstruction());
@@ -570,9 +568,9 @@ void ZoneAlgorithm::collectCompatibleElts() {
for (auto &Stmt : *S)
collectIncompatibleElts(&Stmt, IncompatibleElts, AllElts);
- NumIncompatibleArrays += isl_union_set_n_set(IncompatibleElts.keep());
+ NumIncompatibleArrays += isl_union_set_n_set(IncompatibleElts.get());
CompatibleElts = AllElts.subtract(IncompatibleElts);
- NumCompatibleArrays += isl_union_set_n_set(CompatibleElts.keep());
+ NumCompatibleArrays += isl_union_set_n_set(CompatibleElts.get());
}
isl::map ZoneAlgorithm::getScatterFor(ScopStmt *Stmt) const {
@@ -626,7 +624,7 @@ isl::map ZoneAlgorithm::getScalarReachingDefinition(ScopStmt *Stmt) {
isl::map ZoneAlgorithm::getScalarReachingDefinition(isl::set DomainDef) {
auto DomId = DomainDef.get_tuple_id();
- auto *Stmt = static_cast<ScopStmt *>(isl_id_get_user(DomId.keep()));
+ auto *Stmt = static_cast<ScopStmt *>(isl_id_get_user(DomId.get()));
auto StmtResult = getScalarReachingDefinition(Stmt);
OpenPOWER on IntegriCloud