Commit 9f4749b1 by J"orn Rennecke Committed by Joern Rennecke

reload.c (find_reloads_toplev): When processing X recursively...

	* reload.c (find_reloads_toplev): When processing X recursively,
	don't alter it destructively except by filling in constants.

From-SVN: r25840
parent 735396d9
Thu Mar 18 19:09:50 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* reload.c (find_reloads_toplev): When processing X recursively,
don't alter it destructively except by filling in constants.
Thu Mar 18 10:14:18 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cccp.c (default_include): Initialize structure memebers.
......
......@@ -4367,6 +4367,7 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest, insn)
register char *fmt = GET_RTX_FORMAT (code);
register int i;
int copied;
if (code == REG)
{
......@@ -4503,11 +4504,24 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest, insn)
insn);
}
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
for (copied = 0, i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
XEXP (x, i) = find_reloads_toplev (XEXP (x, i), opnum, type,
{
rtx new_part = find_reloads_toplev (XEXP (x, i), opnum, type,
ind_levels, is_set_dest, insn);
/* If we have replaced a reg with it's equivalent memory loc -
that can still be handled here e.g. if it's in a paradoxical
subreg - we must make the change in a copy, rather than using
a destructive change. This way, find_reloads can still elect
not to do the change. */
if (new_part != XEXP (x, i) && ! CONSTANT_P (new_part) && ! copied)
{
x = copy_rtx (x);
copied = 1;
}
XEXP (x, i) = new_part;
}
}
return x;
}
......
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