diff options
author | Tobias Grosser <tobias@grosser.es> | 2018-04-28 22:11:48 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2018-04-28 22:11:48 +0000 |
commit | daf68ea309ced77f2bf5bc4b3cbf2374449bf8c6 (patch) | |
tree | c96296c5f0badd5121fc8a5e93c02b4ebdedfbbe /polly | |
parent | 2f549fd6a9a3339f35abd7ffe132d0cc7e8bc3cf (diff) | |
download | bcm5719-llvm-daf68ea309ced77f2bf5bc4b3cbf2374449bf8c6.tar.gz bcm5719-llvm-daf68ea309ced77f2bf5bc4b3cbf2374449bf8c6.zip |
[ZoneAlgo] Remove uses of isl::give - II
llvm-svn: 331121
Diffstat (limited to 'polly')
-rw-r--r-- | polly/lib/Transform/ZoneAlgo.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/polly/lib/Transform/ZoneAlgo.cpp b/polly/lib/Transform/ZoneAlgo.cpp index 9784091fbbe..c9bd003d20a 100644 --- a/polly/lib/Transform/ZoneAlgo.cpp +++ b/polly/lib/Transform/ZoneAlgo.cpp @@ -625,12 +625,12 @@ isl::map ZoneAlgorithm::getScalarReachingDefinition(ScopStmt *Stmt) { } isl::map ZoneAlgorithm::getScalarReachingDefinition(isl::set DomainDef) { - auto DomId = give(isl_set_get_tuple_id(DomainDef.keep())); + auto DomId = DomainDef.get_tuple_id(); auto *Stmt = static_cast<ScopStmt *>(isl_id_get_user(DomId.keep())); auto StmtResult = getScalarReachingDefinition(Stmt); - return give(isl_map_intersect_range(StmtResult.take(), DomainDef.take())); + return StmtResult.intersect_range(DomainDef); } isl::map ZoneAlgorithm::makeUnknownForDomain(ScopStmt *Stmt) const { @@ -707,11 +707,10 @@ isl::map ZoneAlgorithm::makeValInst(Value *Val, ScopStmt *UserStmt, Loop *Scope, auto ValSet = makeValueSet(Val); // { UserDomain[] -> llvm::Value } - auto ValInstSet = - give(isl_map_from_domain_and_range(DomainUse.take(), ValSet.take())); + auto ValInstSet = isl::map::from_domain_and_range(DomainUse, ValSet); // { UserDomain[] -> [UserDomain[] - >llvm::Value] } - auto Result = give(isl_map_reverse(isl_map_domain_map(ValInstSet.take()))); + auto Result = ValInstSet.domain_map().reverse(); simplify(Result); return Result; } @@ -738,19 +737,16 @@ isl::map ZoneAlgorithm::makeValInst(Value *Val, ScopStmt *UserStmt, Loop *Scope, auto UserSched = getScatterFor(DomainUse); // { DomainUse[] -> DomainDef[] } - auto UsedInstance = - give(isl_map_apply_range(UserSched.take(), ReachDef.take())); + auto UsedInstance = UserSched.apply_range(ReachDef); // { llvm::Value } auto ValSet = makeValueSet(Val); // { DomainUse[] -> llvm::Value[] } - auto ValInstSet = - give(isl_map_from_domain_and_range(DomainUse.take(), ValSet.take())); + auto ValInstSet = isl::map::from_domain_and_range(DomainUse, ValSet); // { DomainUse[] -> [DomainDef[] -> llvm::Value] } - auto Result = - give(isl_map_range_product(UsedInstance.take(), ValInstSet.take())); + auto Result = UsedInstance.range_product(ValInstSet); simplify(Result); return Result; @@ -903,8 +899,7 @@ void ZoneAlgorithm::computeCommon() { } // { DomainWrite[] -> Element[] } - AllWrites = - give(isl_union_map_union(AllMustWrites.copy(), AllMayWrites.copy())); + AllWrites = AllMustWrites.unite(AllMayWrites); // { [Element[] -> Zone[]] -> DomainWrite[] } WriteReachDefZone = |