isl_basic_map_copy: mark duplicated copy as finalized
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 3 Jun 2010 16:36:56 +0000 (18:36 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 3 Jun 2010 16:36:56 +0000 (18:36 +0200)
If an unfinalized copy is needed, the caller will perform an
isl_basic_map_cow on the copy.

isl_map.c

index b55ebe8..d221f21 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -466,7 +466,10 @@ struct isl_basic_map *isl_basic_map_copy(struct isl_basic_map *bmap)
                bmap->ref++;
                return bmap;
        }
-       return isl_basic_map_dup(bmap);
+       bmap = isl_basic_map_dup(bmap);
+       if (bmap)
+               ISL_F_SET(bmap, ISL_BASIC_SET_FINAL);
+       return bmap;
 }
 
 struct isl_map *isl_map_copy(struct isl_map *map)