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
This commit is contained in:
J"orn Rennecke 1999-03-18 11:12:01 +00:00 committed by Joern Rennecke
parent 735396d963
commit 9f4749b181
2 changed files with 22 additions and 3 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -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,
ind_levels, is_set_dest, insn);
{
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;
}