diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-11 22:57:48 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-11 22:57:48 +0000 |
commit | eeb4a70e0494cb512833c91db02f1cb6941397ea (patch) | |
tree | 2eff488b5ad6159e99a3ff6f794725c55d868d40 /gcc/regrename.c | |
parent | bd214d136822c2a0a00ac45199de4ff44f515176 (diff) | |
download | gcc-eeb4a70e0494cb512833c91db02f1cb6941397ea.tar.gz |
* Makefile.in (web.o): New.
* web.c: New file.
* rtl.h (web_main): Declare.
* timervar.def (TV_WEB): New.
* toplev.c (dump_file_index, dump_file_info): Add DFI_web.
(rest_of_hanle_web): New.
(flag_web): New static variable.
(lang_independent_options): Add "web".
(rest_of_compilation): Call rest_of_handle_web.
* invoke.texi (-fweb): Document.
* common.opt (fweb): New.
* flags.h (flag_web): New.
* opts.c (decode_options): Set flag_web at -O3.
* passes.texi (web construction): Document.
* invoke.texi (-O3): Document that -fweb is enabled.
* regrename.c (regrename_optimize): Deal better with situation when
replacement failed.
* sched-ebb.c: Include params.h and profile.h
(schedule_ebbs): Use tracer parameters to discover superblocks
* Makefile.in (sched-ebb.o): Add dependencies.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72383 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r-- | gcc/regrename.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c index c1ff6255316..4e93fab796b 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -230,7 +230,7 @@ regrename_optimize (void) CLEAR_HARD_REG_SET (regs_seen); while (all_chains) { - int new_reg, best_new_reg = -1; + int new_reg, best_new_reg; int n_uses; struct du_chain *this = all_chains; struct du_chain *tmp, *last; @@ -240,6 +240,8 @@ regrename_optimize (void) all_chains = this->next_chain; + best_new_reg = reg; + #if 0 /* This just disables optimization opportunities. */ /* Only rename once we've seen the reg more than once. */ if (! TEST_HARD_REG_BIT (regs_seen, reg)) @@ -320,8 +322,7 @@ regrename_optimize (void) break; if (! tmp) { - if (best_new_reg == -1 - || tick[best_new_reg] > tick[new_reg]) + if (tick[best_new_reg] > tick[new_reg]) best_new_reg = new_reg; } } @@ -334,15 +335,16 @@ regrename_optimize (void) fprintf (rtl_dump_file, " crosses a call"); } - if (best_new_reg == -1) + if (best_new_reg == reg) { + tick[reg] = ++this_tick; if (rtl_dump_file) - fprintf (rtl_dump_file, "; no available registers\n"); + fprintf (rtl_dump_file, "; no available better choice\n"); continue; } do_replace (this, best_new_reg); - tick[best_new_reg] = this_tick++; + tick[best_new_reg] = ++this_tick; if (rtl_dump_file) fprintf (rtl_dump_file, ", renamed as %s\n", reg_names[best_new_reg]); |