aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-05-27 15:21:17 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-05-27 11:21:17 -0400
commit8d5e6e2527f07e6cfda3b62f1fd826006931d551 (patch)
treee4055b6cf63a0bcf4381fb7092adf5db521626a7 /gcc/expr.c
parent0777f60c79e32b504c03b6a703d6833ca6bc91c5 (diff)
downloadgcc-8d5e6e2527f07e6cfda3b62f1fd826006931d551.zip
gcc-8d5e6e2527f07e6cfda3b62f1fd826006931d551.tar.gz
gcc-8d5e6e2527f07e6cfda3b62f1fd826006931d551.tar.bz2
tree.h (TREE_CODE_LENGTH): New macro.
* tree.h (TREE_CODE_LENGTH): New macro. * c-common.c (c_find_base_decl): Use it. * expr.c (safe_from_p): Likewise. * print-tree.c (print_node): Likewise. * tree.c (make_node, copy_node, get_identifier): Likewie. (first_rtl_op, contains_placeholder_p, substitute_in_expr): Likewise. (build, build_nt, build_parse_node, simple_cst_equal): Likewise. * fold-const.c (make_range): Likewise. (fold): Likewise; also use first_rtl_op. * c-iterate.c (collect_iterators): Use first_rtl_op. * calls.c (calls_function_1): Likewise; also rename TYPE to CLASS. Use IS_EXPR_CODE_CLASS. (preexpand_calls): Likewise. * ggc-common.c (ggc_mark_trees): Rework to use first_rtl_op and TREE_CODE_LENGTH. * stmt.c (warn_if_unused_value): If no operands, no unused value. * ch/lang.c (deep_const_expr): Use first_rtl_op. * ch/satisfy.c (satisfy): Use TREE_CODE_LENGTH. * cp/method.c (mangle_expression): Use TREE_CODE_LENGTH. * cp/tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH. (built_min, cp_tree_equal): Likewise. From-SVN: r34203
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index fcd4845..5cef748 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -5499,7 +5499,7 @@ safe_from_p (x, exp, top_p)
return 0;
save_expr_rewritten[save_expr_count++] = exp;
- nops = tree_code_length[(int) SAVE_EXPR];
+ nops = TREE_CODE_LENGTH (SAVE_EXPR);
for (i = 0; i < nops; i++)
{
tree operand = TREE_OPERAND (exp, i);
@@ -5530,7 +5530,7 @@ safe_from_p (x, exp, top_p)
if (exp_rtl)
break;
- nops = tree_code_length[(int) TREE_CODE (exp)];
+ nops = TREE_CODE_LENGTH (TREE_CODE (exp));
for (i = 0; i < nops; i++)
if (TREE_OPERAND (exp, i) != 0
&& ! safe_from_p (x, TREE_OPERAND (exp, i), 0))
@@ -9079,14 +9079,14 @@ preexpand_calls (exp)
tree exp;
{
register int nops, i;
- int type = TREE_CODE_CLASS (TREE_CODE (exp));
+ int class = TREE_CODE_CLASS (TREE_CODE (exp));
if (! do_preexpand_calls)
return;
/* Only expressions and references can contain calls. */
- if (type != 'e' && type != '<' && type != '1' && type != '2' && type != 'r')
+ if (! IS_EXPR_CODE_CLASS (class) && class != 'r')
return;
switch (TREE_CODE (exp))
@@ -9134,7 +9134,7 @@ preexpand_calls (exp)
break;
}
- nops = tree_code_length[(int) TREE_CODE (exp)];
+ nops = TREE_CODE_LENGTH (TREE_CODE (exp));
for (i = 0; i < nops; i++)
if (TREE_OPERAND (exp, i) != 0)
{
@@ -9144,9 +9144,8 @@ preexpand_calls (exp)
;
else
{
- type = TREE_CODE_CLASS (TREE_CODE (TREE_OPERAND (exp, i)));
- if (type == 'e' || type == '<' || type == '1' || type == '2'
- || type == 'r')
+ class = TREE_CODE_CLASS (TREE_CODE (TREE_OPERAND (exp, i)));
+ if (IS_EXPR_CODE_CLASS (class) || class == 'r')
preexpand_calls (TREE_OPERAND (exp, i));
}
}