summaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-03 15:56:17 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-03 15:56:17 +0000
commitaa0db1ad6c91cf4d3fb1cf623cef28dccaeb1644 (patch)
tree8f97ad08360a62515f315d4af00d268994015a1e /gcc/reload.c
parent278fe152d9ce422bd94882c2368c79261a49d7e7 (diff)
downloadgcc-aa0db1ad6c91cf4d3fb1cf623cef28dccaeb1644.tar.gz
* reload.c (combine_reloads): Don't combine an output reload if there
are other reloads around for part of the output. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46734 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 9ed9cd09948..ad884ae4c78 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -1641,6 +1641,16 @@ combine_reloads ()
if (earlyclobber_operand_p (rld[output_reload].out))
return;
+ /* If there is a reload for part of the address of this operand, we would
+ need to chnage it to RELOAD_FOR_OTHER_ADDRESS. But that would extend
+ its life to the point where doing this combine would not lower the
+ number of spill registers needed. */
+ for (i = 0; i < n_reloads; i++)
+ if ((rld[i].when_needed == RELOAD_FOR_OUTPUT_ADDRESS
+ || rld[i].when_needed == RELOAD_FOR_OUTADDR_ADDRESS)
+ && rld[i].opnum == rld[output_reload].opnum)
+ return;
+
/* Check each input reload; can we combine it? */
for (i = 0; i < n_reloads; i++)