[PATCH] isl_basic_set_copy: implement in terms of isl_basic_map_copy

2 views
Skip to first unread message

skim...@kotnet.org

unread,
Aug 1, 2021, 12:00:43 PMAug 1
to isl-dev...@googlegroups.com
From: Sven Verdoolaege <sk...@kotnet.org>

This makes the two implementations converge again.
They diverged in 218439f (isl_basic_map_copy: mark duplicated copy as
finalized, Thu Jun 3 18:36:56 2010 +0200).

Signed-off-by: Sven Verdoolaege <sven.ver...@gmail.com>
---
isl_map.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/isl_map.c b/isl_map.c
index 516106cf3a..a8caf23d85 100644
--- a/isl_map.c
+++ b/isl_map.c
@@ -1464,14 +1464,7 @@ __isl_give isl_basic_set *isl_basic_set_dup(__isl_keep isl_basic_set *bset)

__isl_give isl_basic_set *isl_basic_set_copy(__isl_keep isl_basic_set *bset)
{
- if (!bset)
- return NULL;
-
- if (ISL_F_ISSET(bset, ISL_BASIC_SET_FINAL)) {
- bset->ref++;
- return bset;
- }
- return isl_basic_set_dup(bset);
+ return bset_from_bmap(isl_basic_map_copy(bset_to_bmap(bset)));
}

__isl_give isl_set *isl_set_copy(__isl_keep isl_set *set)
--
2.25.1

Reply all
Reply to author
Forward
0 new messages