This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: Death to REFERENCE_EXPR
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 6 Jul 2004 13:54:05 -0400
- Subject: [PATCH]: Death to REFERENCE_EXPR
Nothing generates these things anymore. I'm pretty sure nobody ever
knew what they did, either.
Bootstrapped and regtested on powerpc-darwin.
pre-approved by RTH on IRC (but i'll wait a few hours before committing
to make sure nobody has any problem with this).
2004-07-06 Daniel Berlin <dberlin@dberlin.org>
* dojump.c (do_jump): REFERENCE_EXPR is dead.
* expr.c (expand_expr_real_1): Ditto.
* tree-inline.c (estimate_num_insns_1): Ditto.
* tree-pretty-print.c (dump_generic_node): Ditto.
(op_symbol): Ditto.
* tree.def: Ditto.
Index: dojump.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dojump.c,v
retrieving revision 1.21
diff -u -3 -p -r1.21 dojump.c
--- dojump.c 1 Jul 2004 12:52:37 -0000 1.21
+++ dojump.c 6 Jul 2004 17:48:11 -0000
@@ -208,7 +208,6 @@ do_jump (tree exp, rtx if_false_label, r
< TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (exp, 0)))))
goto normal;
case NON_LVALUE_EXPR:
- case REFERENCE_EXPR:
case ABS_EXPR:
case NEGATE_EXPR:
case LROTATE_EXPR:
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.668
diff -u -3 -p -r1.668 expr.c
--- expr.c 5 Jul 2004 21:57:43 -0000 1.668
+++ expr.c 6 Jul 2004 17:48:13 -0000
@@ -6443,8 +6443,8 @@ expand_expr_real_1 (tree exp, rtx target
original_target = target;
ignore = (target == const0_rtx
|| ((code == NON_LVALUE_EXPR || code == NOP_EXPR
- || code == CONVERT_EXPR || code == REFERENCE_EXPR
- || code == COND_EXPR || code == VIEW_CONVERT_EXPR)
+ || code == CONVERT_EXPR || code == COND_EXPR
+ || code == VIEW_CONVERT_EXPR)
&& TREE_CODE (type) == VOID_TYPE));
/* If we are going to ignore this result, we need only do something
@@ -7503,7 +7503,6 @@ expand_expr_real_1 (tree exp, rtx target
case NON_LVALUE_EXPR:
case NOP_EXPR:
case CONVERT_EXPR:
- case REFERENCE_EXPR:
if (TREE_OPERAND (exp, 0) == error_mark_node)
return const0_rtx;
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.121
diff -u -3 -p -r1.121 tree-inline.c
--- tree-inline.c 5 Jul 2004 16:39:15 -0000 1.121
+++ tree-inline.c 6 Jul 2004 17:48:15 -0000
@@ -1217,7 +1217,6 @@ estimate_num_insns_1 (tree *tp, int *wal
case SAVE_EXPR:
case UNSAVE_EXPR:
case ADDR_EXPR:
- case REFERENCE_EXPR:
case COMPLEX_EXPR:
case EXIT_BLOCK_EXPR:
case CASE_LABEL_EXPR:
Index: tree-pretty-print.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-pretty-print.c,v
retrieving revision 2.19
diff -u -3 -p -r2.19 tree-pretty-print.c
--- tree-pretty-print.c 5 Jul 2004 15:16:10 -0000 2.19
+++ tree-pretty-print.c 6 Jul 2004 17:48:16 -0000
@@ -999,7 +999,6 @@ dump_generic_node (pretty_printer *buffe
case BIT_NOT_EXPR:
case TRUTH_NOT_EXPR:
case ADDR_EXPR:
- case REFERENCE_EXPR:
case PREDECREMENT_EXPR:
case PREINCREMENT_EXPR:
case INDIRECT_REF:
@@ -1851,9 +1850,6 @@ op_symbol (tree op)
case POSTINCREMENT_EXPR:
return "++ ";
- case REFERENCE_EXPR:
- return "";
-
default:
return "<<< ??? >>>";
}
Index: tree.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.def,v
retrieving revision 1.89
diff -u -3 -p -r1.89 tree.def
--- tree.def 5 Jul 2004 09:35:26 -0000 1.89
+++ tree.def 6 Jul 2004 17:48:16 -0000
@@ -739,9 +739,6 @@ DEFTREECODE (UNSAVE_EXPR, "unsave_expr",
Operand may have any mode. Result mode is Pmode. */
DEFTREECODE (ADDR_EXPR, "addr_expr", 'e', 1)
-/* Non-lvalue reference or pointer to an object. */
-DEFTREECODE (REFERENCE_EXPR, "reference_expr", 'e', 1)
-
/* Operand is a function constant; result is a function variable value
of type EPmode. Used only for languages that need static chains.
*/
DEFTREECODE (ENTRY_VALUE_EXPR, "entry_value_expr", 'e', 1)