+2001-04-27 Zack Weinberg <zackw@stanford.edu>
+
+ * function.c (purge_addressof_1): Remove the duplicate
+ if (code == SET) block. Fold the two if (code == ADDRESSOF)
+ blocks together.
+
2001-04-28 Jason Merrill <jason_merrill@redhat.com>
* except.c (expand_eh_region_start): Don't start a new block.
result &= purge_addressof_1 (&SET_SRC (x), insn, force, 0, ht);
return result;
}
-
- else if (code == ADDRESSOF && GET_CODE (XEXP (x, 0)) == MEM)
+ else if (code == ADDRESSOF)
{
+ rtx sub, insns;
+
+ if (GET_CODE (XEXP (x, 0)) != MEM)
+ {
+ put_addressof_into_stack (x, ht);
+ return true;
+ }
+
/* We must create a copy of the rtx because it was created by
overwriting a REG rtx which is always shared. */
- rtx sub = copy_rtx (XEXP (XEXP (x, 0), 0));
- rtx insns;
-
+ sub = copy_rtx (XEXP (XEXP (x, 0), 0));
if (validate_change (insn, loc, sub, 0)
|| validate_replace_rtx (x, sub, insn))
return true;
}
goto restart;
}
- give_up:;
- /* else give up and put it into the stack */
- }
-
- else if (code == ADDRESSOF)
- {
- put_addressof_into_stack (x, ht);
- return true;
- }
- else if (code == SET)
- {
- result = purge_addressof_1 (&SET_DEST (x), insn, force, 1, ht);
- result &= purge_addressof_1 (&SET_SRC (x), insn, force, 0, ht);
- return result;
}
+ give_up:
/* Scan all subexpressions. */
fmt = GET_RTX_FORMAT (code);
for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)