Translate the full algorithm to use the new isl C++ bindings
This is a large piece of code that has been written with the Polly IslPtr<>
memory management tool, which only performed memory management, but did not
provide a method interface. As such the code was littered with calls to
give(), copy(), keep(), and take(). The diff of this change should give a
good example how the new method interface simplifies the code by removing the
need for switching between managed types and C functions all the time
and consequently also the need to use the long C function names.
These are a couple of examples comparing the old IslPtr memory management
interface with the complete method interface.
Check properties
Before:
if (isl_aff_is_zero(Aff.get()) || isl_aff_is_one(Aff.get())) return true;
After:
if (Aff.isZero() || Aff.isOne()) return true;
Type conversion
Before:
isl_union_pw_multi_aff *UPMA = give(isl_union_pw_multi_aff_from_union_map(UMap.copy());
After:
isl::UnionPwMultiAff UPMA = UMap;
Type construction
Before:
auto Empty = give(isl_union_map_empty(Space.copy());
After:
auto Empty = isl::UnionMap::empty(Space);
Operations
Before:
Set = give(isl_union_set_intersect(Set.copy(), Set2.copy());
After:
Set = Set.intersect(Set2);