forked from OSchip/llvm-project
[unittests] Derive Occupied from Unused when given.
When both, OccupiedAndKnown and Unused are given, use the former only for the Known values. The relation Unused \union Occupied must always hold. This allows us to specify Known independently of Occupied. It is needed for an artificial test case in https://reviews.llvm.org/D32025. llvm-svn: 301284
This commit is contained in:
parent
b745b740f9
commit
a8b0be819a
|
@ -38,12 +38,19 @@ void completeLifetime(isl::union_set Universe, isl::union_map OccupiedAndKnown,
|
|||
isl::union_set &Undef) {
|
||||
auto ParamSpace = give(isl_union_set_get_space(Universe.keep()));
|
||||
|
||||
if (OccupiedAndKnown) {
|
||||
if (Undef && !Occupied) {
|
||||
assert(!Occupied);
|
||||
Occupied = give(isl_union_set_subtract(Universe.copy(), Undef.copy()));
|
||||
}
|
||||
|
||||
if (OccupiedAndKnown) {
|
||||
assert(!Known);
|
||||
|
||||
Known = isl::union_map::empty(ParamSpace);
|
||||
Occupied = OccupiedAndKnown.domain();
|
||||
|
||||
if (!Occupied)
|
||||
Occupied = OccupiedAndKnown.domain();
|
||||
|
||||
OccupiedAndKnown.foreach_map([&Known](isl::map Map) -> isl::stat {
|
||||
if (isl_map_has_tuple_name(Map.keep(), isl_dim_out) != isl_bool_true)
|
||||
return isl::stat::ok;
|
||||
|
@ -52,11 +59,6 @@ void completeLifetime(isl::union_set Universe, isl::union_map OccupiedAndKnown,
|
|||
});
|
||||
}
|
||||
|
||||
if (!Occupied) {
|
||||
assert(Undef);
|
||||
Occupied = give(isl_union_set_subtract(Universe.copy(), Undef.copy()));
|
||||
}
|
||||
|
||||
if (!Undef) {
|
||||
assert(Occupied);
|
||||
Undef = give(isl_union_set_subtract(Universe.copy(), Occupied.copy()));
|
||||
|
|
Loading…
Reference in New Issue