[polly] r303608 - [ScopInfo] Translate isReadOnly to isl C++
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 23:41:04 PDT 2017
Author: grosser
Date: Tue May 23 01:41:04 2017
New Revision: 303608
URL: http://llvm.org/viewvc/llvm-project?rev=303608&view=rev
Log:
[ScopInfo] Translate isReadOnly to isl C++
Modified:
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=303608&r1=303607&r2=303608&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Tue May 23 01:41:04 2017
@@ -274,15 +274,11 @@ __isl_give isl_space *ScopArrayInfo::get
}
bool ScopArrayInfo::isReadOnly() {
- isl_union_set *WriteSet = isl_union_map_range(S.getWrites());
- isl_space *Space = getSpace();
- WriteSet = isl_union_set_intersect(
- WriteSet, isl_union_set_from_set(isl_set_universe(Space)));
+ isl::union_set WriteSet = give(S.getWrites()).range();
+ isl::space Space = give(getSpace());
+ WriteSet = WriteSet.extract_set(Space);
- bool IsReadOnly = isl_union_set_is_empty(WriteSet);
- isl_union_set_free(WriteSet);
-
- return IsReadOnly;
+ return bool(WriteSet.is_empty());
}
bool ScopArrayInfo::isCompatibleWith(const ScopArrayInfo *Array) const {
More information about the llvm-commits
mailing list