Commit cc2e8b2d by Zack Weinberg Committed by Zack Weinberg

function.c (purge_addressof_1): Remove the duplicate if (code == SET) block.

	* function.c (purge_addressof_1): Remove the duplicate
	if (code == SET) block.  Fold the two if (code == ADDRESSOF)
	blocks together.

From-SVN: r41649
parent 3f3942e8
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> 2001-04-28 Jason Merrill <jason_merrill@redhat.com>
* except.c (expand_eh_region_start): Don't start a new block. * except.c (expand_eh_region_start): Don't start a new block.
......
...@@ -2991,14 +2991,19 @@ purge_addressof_1 (loc, insn, force, store, ht) ...@@ -2991,14 +2991,19 @@ purge_addressof_1 (loc, insn, force, store, ht)
result &= purge_addressof_1 (&SET_SRC (x), insn, force, 0, ht); result &= purge_addressof_1 (&SET_SRC (x), insn, force, 0, ht);
return result; return result;
} }
else if (code == ADDRESSOF)
else if (code == ADDRESSOF && GET_CODE (XEXP (x, 0)) == MEM)
{ {
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 /* We must create a copy of the rtx because it was created by
overwriting a REG rtx which is always shared. */ overwriting a REG rtx which is always shared. */
rtx sub = copy_rtx (XEXP (XEXP (x, 0), 0)); sub = copy_rtx (XEXP (XEXP (x, 0), 0));
rtx insns;
if (validate_change (insn, loc, sub, 0) if (validate_change (insn, loc, sub, 0)
|| validate_replace_rtx (x, sub, insn)) || validate_replace_rtx (x, sub, insn))
return true; return true;
...@@ -3210,22 +3215,9 @@ purge_addressof_1 (loc, insn, force, store, ht) ...@@ -3210,22 +3215,9 @@ purge_addressof_1 (loc, insn, force, store, ht)
} }
goto restart; 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. */ /* Scan all subexpressions. */
fmt = GET_RTX_FORMAT (code); fmt = GET_RTX_FORMAT (code);
for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++) for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
......
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