diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1999-10-27 02:14:12 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1999-10-27 03:14:12 +0100 |
commit | 09a308fe0858315bf9b95ce5a8747c3c8ea351e0 (patch) | |
tree | 7029a1edafb8e3f060c15a751871f7acafd0a18a /gcc/reload1.c | |
parent | a05924f91bc802882777615e301bb79fda1f4035 (diff) | |
download | gcc-09a308fe0858315bf9b95ce5a8747c3c8ea351e0.zip gcc-09a308fe0858315bf9b95ce5a8747c3c8ea351e0.tar.gz gcc-09a308fe0858315bf9b95ce5a8747c3c8ea351e0.tar.bz2 |
reload.h (earlyclobber_operand_p): Declare.
* reload.h (earlyclobber_operand_p): Declare.
* reload.c (earlyclobber_operand_p): Don't declare. No longer static.
* reload1.c (reload_reg_free_for_value_p): RELOAD_OTHER reloads with
an earlyclobbered output conflict with RELOAD_INPUT reloads - handle
case where the RELOAD_OTHER reload is new. Use earlyclobber_operand_p.
From-SVN: r30202
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 0528860..955acca 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -5291,6 +5291,10 @@ reload_reg_free_for_value_p (regno, opnum, type, value, out, reloadnum, int ignore_address_reloads; { int time1; + /* Set if we see an input reload that must not share its reload register + with any new earlyclobber, but might otherwise share the reload + register with an output or input-output reload. */ + int check_earlyclobber = 0; int i; int copy = 0; @@ -5372,7 +5376,7 @@ reload_reg_free_for_value_p (regno, opnum, type, value, out, reloadnum, if (! rld[i].in || ! rtx_equal_p (rld[i].in, value) || rld[i].out || out) { - int j, time2; + int time2; switch (rld[i].when_needed) { case RELOAD_FOR_OTHER_ADDRESS: @@ -5411,6 +5415,7 @@ reload_reg_free_for_value_p (regno, opnum, type, value, out, reloadnum, break; case RELOAD_FOR_INPUT: time2 = rld[i].opnum * 4 + 4; + check_earlyclobber = 1; break; /* rld[i].opnum * 4 + 4 <= (MAX_RECOG_OPERAND - 1) * 4 + 4 == MAX_RECOG_OPERAND * 4 */ @@ -5423,6 +5428,7 @@ reload_reg_free_for_value_p (regno, opnum, type, value, out, reloadnum, break; case RELOAD_FOR_OPERAND_ADDRESS: time2 = MAX_RECOG_OPERANDS * 4 + 2; + check_earlyclobber = 1; break; case RELOAD_FOR_INSN: time2 = MAX_RECOG_OPERANDS * 4 + 3; @@ -5452,9 +5458,8 @@ reload_reg_free_for_value_p (regno, opnum, type, value, out, reloadnum, { time2 = MAX_RECOG_OPERANDS * 4 + 4; /* Earlyclobbered outputs must conflict with inputs. */ - for (j = 0; j < n_earlyclobbers; j++) - if (rld[i].out == reload_earlyclobbers[j]) - time2 = MAX_RECOG_OPERANDS * 4 + 3; + if (earlyclobber_operand_p (rld[i].out)) + time2 = MAX_RECOG_OPERANDS * 4 + 3; break; } @@ -5478,6 +5483,11 @@ reload_reg_free_for_value_p (regno, opnum, type, value, out, reloadnum, } } } + + /* Earlyclobbered outputs must conflict with inputs. */ + if (check_earlyclobber && out && earlyclobber_operand_p (out)) + return 0; + return 1; } |