[polly] r312476 - [ISLTools]: Move singleton to isl++
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 4 03:05:29 PDT 2017
Author: grosser
Date: Mon Sep 4 03:05:29 2017
New Revision: 312476
URL: http://llvm.org/viewvc/llvm-project?rev=312476&view=rev
Log:
[ISLTools]: Move singleton to isl++
Modified:
polly/trunk/lib/Support/ISLTools.cpp
Modified: polly/trunk/lib/Support/ISLTools.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/ISLTools.cpp?rev=312476&r1=312475&r2=312476&view=diff
==============================================================================
--- polly/trunk/lib/Support/ISLTools.cpp (original)
+++ polly/trunk/lib/Support/ISLTools.cpp Mon Sep 4 03:05:29 2017
@@ -135,12 +135,11 @@ isl::map polly::singleton(isl::union_map
return nullptr;
if (isl_union_map_n_map(UMap.keep()) == 0)
- return give(isl_map_empty(ExpectedSpace.take()));
+ return isl::map::empty(ExpectedSpace);
+
+ isl::map Result = isl::map::from_union_map(UMap);
+ assert(!Result || Result.get_space().has_equal_tuples(ExpectedSpace));
- auto Result = give(isl_map_from_union_map(UMap.take()));
- assert(!Result || isl_space_has_equal_tuples(
- give(isl_map_get_space(Result.keep())).keep(),
- ExpectedSpace.keep()) == isl_bool_true);
return Result;
}
@@ -149,12 +148,11 @@ isl::set polly::singleton(isl::union_set
return nullptr;
if (isl_union_set_n_set(USet.keep()) == 0)
- return give(isl_set_empty(ExpectedSpace.copy()));
+ return isl::set::empty(ExpectedSpace);
+
+ isl::set Result(USet);
+ assert(!Result || Result.get_space().has_equal_tuples(ExpectedSpace));
- auto Result = give(isl_set_from_union_set(USet.take()));
- assert(!Result || isl_space_has_equal_tuples(
- give(isl_set_get_space(Result.keep())).keep(),
- ExpectedSpace.keep()) == isl_bool_true);
return Result;
}
@@ -537,4 +535,4 @@ isl::union_map polly::applyDomainRange(i
isl::map polly::intersectRange(isl::map Map, isl::union_set Range) {
isl::set RangeSet = Range.extract_set(Map.get_space().range());
return Map.intersect_range(RangeSet);
-}
\ No newline at end of file
+}
More information about the llvm-commits
mailing list