add isl_schedule_tree_set_pair
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 25 Mar 2016 17:01:13 +0000 (25 18:01 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 27 Mar 2016 10:02:13 +0000 (27 12:02 +0200)
This will be used in the next commit.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_schedule_tree.c
isl_schedule_tree.h

index f832b87..4a5b67e 100644 (file)
@@ -591,6 +591,18 @@ __isl_give isl_schedule_tree *isl_schedule_tree_sequence_pair(
                                                tree1, tree2);
 }
 
+/* Construct a tree with a set root node and as children
+ * "tree1" and "tree2".
+ * If the root of one (or both) of the input trees is itself a set,
+ * then the tree is replaced by its children.
+ */
+__isl_give isl_schedule_tree *isl_schedule_tree_set_pair(
+       __isl_take isl_schedule_tree *tree1,
+       __isl_take isl_schedule_tree *tree2)
+{
+       return isl_schedule_tree_from_pair(isl_schedule_node_set, tree1, tree2);
+}
+
 /* Return the isl_ctx to which "tree" belongs.
  */
 isl_ctx *isl_schedule_tree_get_ctx(__isl_keep isl_schedule_tree *tree)
index fecf9cc..c996b72 100644 (file)
@@ -111,6 +111,9 @@ __isl_give isl_schedule_tree *isl_schedule_tree_from_pair(
 __isl_give isl_schedule_tree *isl_schedule_tree_sequence_pair(
        __isl_take isl_schedule_tree *tree1,
        __isl_take isl_schedule_tree *tree2);
+__isl_give isl_schedule_tree *isl_schedule_tree_set_pair(
+       __isl_take isl_schedule_tree *tree1,
+       __isl_take isl_schedule_tree *tree2);
 
 isl_bool isl_schedule_tree_is_subtree_anchored(
        __isl_keep isl_schedule_tree *tree);