diff options
author | pfg <pfg@FreeBSD.org> | 2013-12-27 15:15:49 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2013-12-27 15:15:49 +0000 |
commit | 8b6b2d3d8496d46a93fc4e85bb15252cc5b500c9 (patch) | |
tree | fdbabc08a4165b85467f136fa910355c121d0b60 | |
parent | db58bebb35105d7db6130885deabc3028eec13ba (diff) | |
download | FreeBSD-src-8b6b2d3d8496d46a93fc4e85bb15252cc5b500c9.zip FreeBSD-src-8b6b2d3d8496d46a93fc4e85bb15252cc5b500c9.tar.gz |
gcc: merge small upstream change.
Backport from mainline:
2007-04-24 Hui-May Chang <hm.chang@apple.com>
* reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER
instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction.
Obtained from: gcc 4.3 (rev. r124115: GPLv2)
MFC after: 1 week
-rw-r--r-- | contrib/gcc/ChangeLog.gcc43 | 5 | ||||
-rw-r--r-- | contrib/gcc/reload1.c | 27 |
2 files changed, 23 insertions, 9 deletions
diff --git a/contrib/gcc/ChangeLog.gcc43 b/contrib/gcc/ChangeLog.gcc43 index e0579e4..ded412b 100644 --- a/contrib/gcc/ChangeLog.gcc43 +++ b/contrib/gcc/ChangeLog.gcc43 @@ -151,6 +151,11 @@ alignment for amdfam10 architecture. Increasing the max loop alignment to 24 bytes. +2007-04-24 Hui-May Chang <hm.chang@apple.com> (r124115) + + * reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER + instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction. + 2007-04-16 Lawrence Crowl <crowl@google.com> (r123909) * doc/invoke.texi (Debugging Options): Add documentation for the diff --git a/contrib/gcc/reload1.c b/contrib/gcc/reload1.c index 30ea7f3..0cc2e7f 100644 --- a/contrib/gcc/reload1.c +++ b/contrib/gcc/reload1.c @@ -6238,15 +6238,23 @@ merge_assigned_reloads (rtx insn) transfer_replacements (i, j); } - /* If this is now RELOAD_OTHER, look for any reloads that load - parts of this operand and set them to RELOAD_FOR_OTHER_ADDRESS - if they were for inputs, RELOAD_OTHER for outputs. Note that - this test is equivalent to looking for reloads for this operand - number. */ - /* We must take special care with RELOAD_FOR_OUTPUT_ADDRESS; it may - share registers with a RELOAD_FOR_INPUT, so we can not change it - to RELOAD_FOR_OTHER_ADDRESS. We should never need to, since we - do not modify RELOAD_FOR_OUTPUT. */ + /* If this is now RELOAD_OTHER, look for any reloads that + load parts of this operand and set them to + RELOAD_FOR_OTHER_ADDRESS if they were for inputs, + RELOAD_OTHER for outputs. Note that this test is + equivalent to looking for reloads for this operand + number. + + We must take special care with RELOAD_FOR_OUTPUT_ADDRESS; + it may share registers with a RELOAD_FOR_INPUT, so we can + not change it to RELOAD_FOR_OTHER_ADDRESS. We should + never need to, since we do not modify RELOAD_FOR_OUTPUT. + + It is possible that the RELOAD_FOR_OPERAND_ADDRESS + instruction is assigned the same register as the earlier + RELOAD_FOR_OTHER_ADDRESS instruction. Merging these two + instructions will cause the RELOAD_FOR_OTHER_ADDRESS + instruction to be deleted later on. */ if (rld[i].when_needed == RELOAD_OTHER) for (j = 0; j < n_reloads; j++) @@ -6254,6 +6262,7 @@ merge_assigned_reloads (rtx insn) && rld[j].when_needed != RELOAD_OTHER && rld[j].when_needed != RELOAD_FOR_OTHER_ADDRESS && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS + && rld[j].when_needed != RELOAD_FOR_OPERAND_ADDRESS && (! conflicting_input || rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS || rld[j].when_needed == RELOAD_FOR_INPADDR_ADDRESS) |