extract out shared bset_to_bmap
The function bset_to_bmap maps an isl_basic_set * to an isl_basic_map *
with the same value, essentially by performing a cast.
Ever since
05f3f66 (merge isl_basic_set/isl_basic_map and isl_set/isl_map,
Wed Jan 26 19:23:39 2011 +0100), isl_basic_set is internally defined to
isl_basic_map such that such a cast is not strictly needed.
However, some of these casts have remained from before that commit.
They are kept because the internal definition of isl_basic_set
to isl_basic_map may be removed at some point.
Performing an explicit cast does not allow the compiler to check
that the input was indeed an isl_basic_set *, which could result
in subtle bugs. Only perform these casts through the bset_to_bmap
function such that the type can be checked.
Since bset_to_bmap is both static and trivial, it should get inlined
automatically. The "inline" keyword is therefore not needed and
it is not added because it is not supported by all compilers that
can compile isl.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>