Commit a4a3f053 by Mike Stump

tree.def (OFFSET_REF): Remove.

        * tree.def (OFFSET_REF): Remove.
        * expr.c (expand_expr, case OFFSET_REF): Ditto.
        * tree.c (substitute_in_expr): Remove OFFSET_REF code.
Remove some old cruft

From-SVN: r12127
parent e349ee73
...@@ -5450,22 +5450,6 @@ expand_expr (exp, target, tmode, modifier) ...@@ -5450,22 +5450,6 @@ expand_expr (exp, target, tmode, modifier)
return target; return target;
} }
case OFFSET_REF:
{
tree base = build1 (ADDR_EXPR, type, TREE_OPERAND (exp, 0));
tree addr = build (PLUS_EXPR, type, base, TREE_OPERAND (exp, 1));
op0 = expand_expr (addr, NULL_RTX, VOIDmode, EXPAND_SUM);
temp = gen_rtx (MEM, mode, memory_address (mode, op0));
MEM_IN_STRUCT_P (temp) = 1;
MEM_VOLATILE_P (temp) = TREE_THIS_VOLATILE (exp);
#if 0 /* It is incorrect to set RTX_UNCHANGING_P here, because the fact that
a location is accessed through a pointer to const does not mean
that the value there can never change. */
RTX_UNCHANGING_P (temp) = TREE_READONLY (exp);
#endif
return temp;
}
/* Intended for a reference to a buffer of a file-object in Pascal. /* Intended for a reference to a buffer of a file-object in Pascal.
But it's not certain that a special tree code will really be But it's not certain that a special tree code will really be
necessary for these. INDIRECT_REF might work for them. */ necessary for these. INDIRECT_REF might work for them. */
......
...@@ -2421,15 +2421,6 @@ substitute_in_expr (exp, f, r) ...@@ -2421,15 +2421,6 @@ substitute_in_expr (exp, f, r)
new = fold (build1 (code, TREE_TYPE (exp), op0)); new = fold (build1 (code, TREE_TYPE (exp), op0));
break; break;
case OFFSET_REF:
op0 = substitute_in_expr (TREE_OPERAND (exp, 0), f, r);
op1 = substitute_in_expr (TREE_OPERAND (exp, 1), f, r);
if (op0 == TREE_OPERAND (exp, 0) && op1 == TREE_OPERAND (exp, 1))
return exp;
new = fold (build (code, TREE_TYPE (exp), op0, op1));
break;
} }
} }
......
...@@ -349,12 +349,6 @@ DEFTREECODE (BIT_FIELD_REF, "bit_field_ref", "r", 3) ...@@ -349,12 +349,6 @@ DEFTREECODE (BIT_FIELD_REF, "bit_field_ref", "r", 3)
/* C unary `*' or Pascal `^'. One operand, an expression for a pointer. */ /* C unary `*' or Pascal `^'. One operand, an expression for a pointer. */
DEFTREECODE (INDIRECT_REF, "indirect_ref", "r", 1) DEFTREECODE (INDIRECT_REF, "indirect_ref", "r", 1)
/* Reference to the contents of an offset
(a value whose type is an OFFSET_TYPE).
Operand 0 is the object within which the offset is taken.
Operand 1 is the offset. */
DEFTREECODE (OFFSET_REF, "offset_ref", "r", 2)
/* Pascal `^` on a file. One operand, an expression for the file. */ /* Pascal `^` on a file. One operand, an expression for the file. */
DEFTREECODE (BUFFER_REF, "buffer_ref", "r", 1) DEFTREECODE (BUFFER_REF, "buffer_ref", "r", 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment