aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1998-05-21 11:52:31 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>1998-05-21 12:52:31 +0100
commitcecbf6e2b3fcef0f3bd4131d78775e65e5bdaf4a (patch)
treec803c0ffc785816b084c3742aee12692acaf1724 /gcc
parentb52ce03da5fcaf93480c6f0d95e9be500a97fb33 (diff)
downloadgcc-cecbf6e2b3fcef0f3bd4131d78775e65e5bdaf4a.zip
gcc-cecbf6e2b3fcef0f3bd4131d78775e65e5bdaf4a.tar.gz
gcc-cecbf6e2b3fcef0f3bd4131d78775e65e5bdaf4a.tar.bz2
reload1.c (reload_reg_free_for_value_p): Fix RELOAD_FOR_INPUT end of lifetime and RELOAD_FOR_OUTPUT start of lifetime.
* reload1.c (reload_reg_free_for_value_p): Fix RELOAD_FOR_INPUT end of lifetime and RELOAD_FOR_OUTPUT start of lifetime. From-SVN: r19929
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/reload1.c24
2 files changed, 23 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 077c913..1bca42d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Thu May 21 19:50:13 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * reload1.c (reload_reg_free_for_value_p): Fix RELOAD_FOR_INPUT
+ end of lifetime and RELOAD_FOR_OUTPUT start of lifetime.
+
Thu May 21 19:32:27 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* combine.c (nonzero_bits): For paradoxical subregs, take
diff --git a/gcc/reload1.c b/gcc/reload1.c
index e3bc950..e0602be 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -5003,7 +5003,14 @@ reload_reg_free_for_value_p (regno, opnum, type, value)
monotonic.
Some reload types use different 'buckets' for each operand.
So there are MAX_RECOG_OPERANDS different time values for each
- such reload type. */
+ such reload type.
+ We compute TIME1 as the time when the register for the prospective
+ new reload ceases to be live, and TIME2 for each existing
+ reload as the time when that the reload register of that reload
+ becomes live.
+ Where there is little to be gained by exact lifetime calculations,
+ we just make conservative assumptions, i.e. a longer lifetime;
+ this is done in the 'default:' cases. */
switch (type)
{
case RELOAD_FOR_OTHER_ADDRESS:
@@ -5022,10 +5029,12 @@ reload_reg_free_for_value_p (regno, opnum, type, value)
time1 = opnum * 4 + 2;
break;
case RELOAD_FOR_INPUT:
- time1 = opnum * 4 + 3;
+ /* All RELOAD_FOR_INPUT reloads remain live till just before the
+ instruction is executed. */
+ time1 = (MAX_RECOG_OPERANDS - 1) * 4 + 3;
break;
/* opnum * 4 + 3 < opnum * 4 + 4
- <= (MAX_RECOG_OPERAND - 1) * 4 + 4 == MAX_RECOG_OPERAND * 4 */
+ <= (MAX_RECOG_OPERANDS - 1) * 4 + 4 == MAX_RECOG_OPERANDS * 4 */
case RELOAD_FOR_OUTPUT_ADDRESS:
time1 = MAX_RECOG_OPERANDS * 4 + opnum;
break;
@@ -5057,10 +5066,13 @@ reload_reg_free_for_value_p (regno, opnum, type, value)
case RELOAD_FOR_INPUT:
time2 = reload_opnum[i] * 4 + 3;
break;
- /* RELOAD_FOR_OUTPUT and RELOAD_FOR_OUTPUT_ADDRESS reloads
- for identical operand number conflict with each other, so
- assign them the same time value. */
case RELOAD_FOR_OUTPUT:
+ /* All RELOAD_FOR_OUTPUT reloads become live just after the
+ instruction is executed. */
+ time2 = MAX_RECOG_OPERANDS * 4;
+ break;
+ /* The first RELOAD_FOR_OUTPUT_ADDRESS reload conflicts with the
+ RELOAD_FOR_OUTPUT reloads, so assign it the same time value. */
case RELOAD_FOR_OUTPUT_ADDRESS:
time2 = MAX_RECOG_OPERANDS * 4 + reload_opnum[i];
break;