Polly 20.0.0git
|
#include "polly/Support/ISLTools.h"
#include "polly/Support/GICHelper.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <vector>
Go to the source code of this file.
Functions | |
static void | foreachPoint (const isl::set &Set, const std::function< void(isl::point P)> &F) |
static void | foreachPoint (isl::basic_set BSet, const std::function< void(isl::point P)> &F) |
static int | flatCompare (const isl::basic_set &A, const isl::basic_set &B) |
Determine the sorting order of the sets A and B without considering the space structure. | |
static int | structureCompare (const isl::space &ASpace, const isl::space &BSpace, bool ConsiderTupleLen) |
Compare the sets A and B according to their nested space structure. | |
static bool | orderComparer (const isl::basic_set &A, const isl::basic_set &B) |
Compare the sets A and B according to their nested space structure. | |
static void | printSortedPolyhedra (isl::union_set USet, llvm::raw_ostream &OS, bool Simplify, bool IsMap) |
Print a string representation of USet to OS . | |
static void | recursiveExpand (isl::basic_set BSet, unsigned Dim, isl::set &Expanded) |
static isl::set | expand (const isl::set &Set) |
Make each point of a set explicit. | |
static isl::union_set | expand (const isl::union_set &USet) |
Expand all points of a union set explicit. | |
Make each point of a set explicit.
"Expanding" makes each point a set contains explicit. That is, the result is a set of singleton polyhedra. Unbounded dimensions are not expanded.
Example: { [i] : 0 <= i < 2 } is expanded to: { [0]; [1] }
Definition at line 838 of file ISLTools.cpp.
References isl::set::empty(), isl::set::get_basic_set_list(), isl::set::get_space(), and recursiveExpand().
Referenced by polly::dumpExpanded(), and expand().
|
static |
Expand all points of a union set explicit.
Definition at line 848 of file ISLTools.cpp.
References isl::union_set::ctx(), isl::union_set::empty(), expand(), isl::union_set::get_set_list(), and isl::union_set::unite().
|
static |
Determine the sorting order of the sets A
and B
without considering the space structure.
Ordering is based on the lower bounds of the set's dimensions. First dimensions are considered first.
Definition at line 621 of file ISLTools.cpp.
References A(), B(), isl::set::convex_hull(), isl::set::dim_min(), polly::getConstant(), isl::param, isl::set, isl::val::sgn(), isl::val::sub(), and unsignedFromIslSize().
Referenced by orderComparer().
|
static |
Definition at line 603 of file ISLTools.cpp.
References isl::set::foreach_point(), and isl::stat::ok().
Referenced by foreachPoint(), and recursiveExpand().
|
static |
Definition at line 611 of file ISLTools.cpp.
References foreachPoint().
|
static |
Compare the sets A
and B
according to their nested space structure.
If the structure is the same, sort using the dimension lower bounds. Returns an std::sort compatible bool.
Definition at line 721 of file ISLTools.cpp.
References A(), B(), flatCompare(), and structureCompare().
Referenced by printSortedPolyhedra().
|
static |
Print a string representation of USet
to OS
.
The pieces of USet
are printed in a sorted order. Spaces with equal or similar nesting structure are printed together. Compared to isl's own printing function the uses the structure itself as base of the sorting, not a hash of it. It ensures that e.g. maps spaces with same domain structure are printed together. Set pieces with same structure are printed in order of their lower bounds.
USet | Polyhedra to print. |
OS | Target stream. |
Simplify | Whether to simplify the polyhedron before printing. |
IsMap | Whether USet is a wrapped map. If true, sets are unwrapped before printing to again appear as a map. |
Definition at line 752 of file ISLTools.cpp.
References assert, isl::set::get_basic_set_list(), isl::union_set::get_set_list(), isl::union_set::is_null(), orderComparer(), simplify, Simplify, Str, and isl::basic_set::unwrap().
Referenced by polly::dumpExpanded(), and polly::dumpPw().
|
static |
Definition at line 804 of file ISLTools.cpp.
References isl::basic_set::dim(), isl::basic_set::fix_val(), foreachPoint(), isl::point::get_coordinate_val(), isl::basic_set::is_bounded(), isl::param, isl::basic_set::project_out(), recursiveExpand(), isl::set, isl::set::unite(), and unsignedFromIslSize().
Referenced by expand(), and recursiveExpand().
|
static |
Compare the sets A
and B
according to their nested space structure.
Returns 0 if the structure is considered equal. If ConsiderTupleLen
is false, the number of dimensions in a tuple are ignored, i.e. a tuple with the same name but different number of dimensions are considered equal.
Definition at line 678 of file ISLTools.cpp.
References isl::space::dim(), isl::space::domain(), isl::space::get_tuple_name(), isl::space::has_tuple_name(), isl::space::is_params(), isl::space::is_wrapping(), isl::space::range(), isl::set, structureCompare(), unsignedFromIslSize(), and isl::space::unwrap().
Referenced by orderComparer(), and structureCompare().