From: Richard Henderson Date: Mon, 28 Jun 2004 22:26:24 +0000 (-0700) Subject: tree.def (REALPART_EXPR, [...]): Change class to 'r'. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=497be9785fcb4acf36758fd264571611a8d266a6;p=gcc.git tree.def (REALPART_EXPR, [...]): Change class to 'r'. * tree.def (REALPART_EXPR, IMAGPART_EXPR): Change class to 'r'. * fold-const.c (operand_equal_p ): Add REALPART_EXPR, IMAGPART_EXPR. * tree-dump.c (dequeue_and_dump): Handle REALPART_EXPR and IMAGPART_EXPR explicitly. * tree-inline.c (estimate_num_insns_1): Don't handle REALPART_EXPR and IMAGPART_EXPR specially. * tree.c (build1_stat): Copy TREE_THIS_VOLATILE into class 'r'. From-SVN: r83825 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e10b2ef35c8..5bdb1ded839 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2004-06-28 Richard Henderson + + * tree.def (REALPART_EXPR, IMAGPART_EXPR): Change class to 'r'. + * fold-const.c (operand_equal_p ): Add REALPART_EXPR, + IMAGPART_EXPR. + * tree-dump.c (dequeue_and_dump): Handle REALPART_EXPR and + IMAGPART_EXPR explicitly. + * tree-inline.c (estimate_num_insns_1): Don't handle REALPART_EXPR + and IMAGPART_EXPR specially. + * tree.c (build1_stat): Copy TREE_THIS_VOLATILE into class 'r'. + 2004-06-28 J"orn Rennecke * config.gcc (sh*-*elf*): Remove dead assignment of sh_multilibs. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 4bb42a4ce9e..66769afd3a8 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2479,6 +2479,8 @@ operand_equal_p (tree arg0, tree arg1, unsigned int flags) switch (TREE_CODE (arg0)) { case INDIRECT_REF: + case REALPART_EXPR: + case IMAGPART_EXPR: return operand_equal_p (TREE_OPERAND (arg0, 0), TREE_OPERAND (arg1, 0), flags); diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c index 39aeeaddf41..314c29f8e8e 100644 --- a/gcc/tree-dump.c +++ b/gcc/tree-dump.c @@ -528,6 +528,8 @@ dequeue_and_dump (dump_info_p di) case INDIRECT_REF: case CLEANUP_POINT_EXPR: case SAVE_EXPR: + case REALPART_EXPR: + case IMAGPART_EXPR: /* These nodes are unary, but do not have code class `1'. */ dump_child ("op 0", TREE_OPERAND (t, 0)); break; diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index ac5256220bc..ed2afeec2e0 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1220,8 +1220,6 @@ estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data) case ADDR_EXPR: case REFERENCE_EXPR: case COMPLEX_EXPR: - case REALPART_EXPR: - case IMAGPART_EXPR: case EXIT_BLOCK_EXPR: case CASE_LABEL_EXPR: case SSA_NAME: diff --git a/gcc/tree.c b/gcc/tree.c index ba95e154606..23577a1ee1f 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -2483,6 +2483,8 @@ build1_stat (enum tree_code code, tree type, tree node MEM_STAT_DECL) TREE_CONSTANT (t) = 1; if (TREE_CODE_CLASS (code) == '1' && node && TREE_INVARIANT (node)) TREE_INVARIANT (t) = 1; + if (TREE_CODE_CLASS (code) == 'r' && node && TREE_THIS_VOLATILE (node)) + TREE_THIS_VOLATILE (t) = 1; break; } diff --git a/gcc/tree.def b/gcc/tree.def index 422817d3215..d1268953690 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -776,8 +776,8 @@ DEFTREECODE (CONJ_EXPR, "conj_expr", '1', 1) /* Used only on an operand of complex type, these return a value of the corresponding component type. */ -DEFTREECODE (REALPART_EXPR, "realpart_expr", '1', 1) -DEFTREECODE (IMAGPART_EXPR, "imagpart_expr", '1', 1) +DEFTREECODE (REALPART_EXPR, "realpart_expr", 'r', 1) +DEFTREECODE (IMAGPART_EXPR, "imagpart_expr", 'r', 1) /* Nodes for ++ and -- in C. The second arg is how much to increment or decrement by.