isl_ast_expr: add isl_ast_op_lt and isl_ast_op_gt operations
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 2 Oct 2012 11:20:24 +0000 (13:20 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 4 Oct 2012 08:27:50 +0000 (10:27 +0200)
isl_ast_op_lt will be useful in the next commit.
isl_ast_op_gt is added for consistency.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/ast.h
isl_ast.c

index 6049a1c..a58c94d 100644 (file)
@@ -5414,10 +5414,18 @@ Equality relation.
 
 Less than or equal relation.
 
+=item C<isl_ast_op_lt>
+
+Less than relation.
+
 =item C<isl_ast_op_ge>
 
 Greater than or equal relation.
 
+=item C<isl_ast_op_gt>
+
+Greater than relation.
+
 =item C<isl_ast_op_call>
 
 A function call.
index 4ddc913..7ff8d0f 100644 (file)
@@ -36,7 +36,9 @@ enum isl_ast_op_type {
        isl_ast_op_select,
        isl_ast_op_eq,
        isl_ast_op_le,
+       isl_ast_op_lt,
        isl_ast_op_ge,
+       isl_ast_op_gt,
        isl_ast_op_call
 };
 
index dbf3904..9224471 100644 (file)
--- a/isl_ast.c
+++ b/isl_ast.c
@@ -918,7 +918,9 @@ static char *op_str[] = {
        [isl_ast_op_div] = "/",
        [isl_ast_op_eq] = "==",
        [isl_ast_op_le] = "<=",
-       [isl_ast_op_ge] = ">="
+       [isl_ast_op_ge] = ">=",
+       [isl_ast_op_lt] = "<",
+       [isl_ast_op_gt] = ">"
 };
 
 /* Precedence in C of the various operators.
@@ -945,6 +947,8 @@ static int op_prec[] = {
        [isl_ast_op_eq] = 9,
        [isl_ast_op_le] = 8,
        [isl_ast_op_ge] = 8,
+       [isl_ast_op_lt] = 8,
+       [isl_ast_op_gt] = 8,
        [isl_ast_op_call] = 2
 };
 
@@ -970,6 +974,8 @@ static int op_left[] = {
        [isl_ast_op_eq] = 1,
        [isl_ast_op_le] = 1,
        [isl_ast_op_ge] = 1,
+       [isl_ast_op_lt] = 1,
+       [isl_ast_op_gt] = 1,
        [isl_ast_op_call] = 1
 };