From 2a5467eb64f631e1a3b1f47776054de92e474ae5 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 2 Oct 2012 13:20:24 +0200 Subject: [PATCH] isl_ast_expr: add isl_ast_op_lt and isl_ast_op_gt operations isl_ast_op_lt will be useful in the next commit. isl_ast_op_gt is added for consistency. Signed-off-by: Sven Verdoolaege --- doc/user.pod | 8 ++++++++ include/isl/ast.h | 2 ++ isl_ast.c | 8 +++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/user.pod b/doc/user.pod index 6049a1ce..a58c94d5 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -5414,10 +5414,18 @@ Equality relation. Less than or equal relation. +=item C + +Less than relation. + =item C Greater than or equal relation. +=item C + +Greater than relation. + =item C A function call. diff --git a/include/isl/ast.h b/include/isl/ast.h index 4ddc9137..7ff8d0fe 100644 --- a/include/isl/ast.h +++ b/include/isl/ast.h @@ -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 }; diff --git a/isl_ast.c b/isl_ast.c index dbf39044..92244710 100644 --- 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 }; -- 2.11.4.GIT