FlattenAlgo: Ensure we _really_ obtain a param space
authorTobias Grosser <tobias@grosser.es>
Fri, 9 Sep 2016 16:11:26 +0000 (16:11 +0000)
committerTobias Grosser <tobias@grosser.es>
Fri, 9 Sep 2016 16:11:26 +0000 (16:11 +0000)
This resolves "isl_space.c:1775: not a parameter space" errors I have seen
on two systems.

llvm-svn: 281052

polly/lib/Transform/FlattenAlgo.cpp

index bd1ce4d..03d337d 100644 (file)
@@ -227,7 +227,8 @@ IslPtr<isl_union_map> tryFlattenSequence(IslPtr<isl_union_map> Schedule) {
   auto ScatterSet =
       give(isl_set_from_union_set(isl_union_map_range(Schedule.copy())));
 
-  auto ParamSpace = give(isl_union_map_get_space(Schedule.keep()));
+  auto ParamSpace =
+      give(isl_space_params(isl_union_map_get_space(Schedule.keep())));
   auto Dims = isl_set_dim(ScatterSet.keep(), isl_dim_set);
   assert(Dims >= 2);