diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2003-02-09 19:18:54 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2003-02-09 19:18:54 +0000 |
commit | 2382b79f354cae47084d9ea18afcdc58e924a4c9 (patch) | |
tree | 2d444c27dc2a8242116b693848782cb1ec2214fc | |
parent | 8275b011ca18ef074a86f39f67b16718e0d647fc (diff) | |
download | gcc-2382b79f354cae47084d9ea18afcdc58e924a4c9.zip gcc-2382b79f354cae47084d9ea18afcdc58e924a4c9.tar.gz gcc-2382b79f354cae47084d9ea18afcdc58e924a4c9.tar.bz2 |
toplev.c (rest_of_compilation): Recompute register usage after split_all_insns.
* toplev.c (rest_of_compilation): Recompute register usage after
split_all_insns.
From-SVN: r62607
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20030209-1.c | 11 | ||||
-rw-r--r-- | gcc/toplev.c | 17 |
4 files changed, 25 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7188c9f..826f092 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-02-09 Richard Sandiford <rsandifo@redhat.com> + + * toplev.c (rest_of_compilation): Recompute register usage after + split_all_insns. + 2003-02-09 Richard Henderson <rth@redhat.com> * libgcc-std.ver (__clztf2): New. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 781af01..8b58ea6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-02-09 Richard Sandiford <rsandifo@redhat.com> + + * gcc.c-torture/execute/20030209-1.c: New test. + 2003-02-09 Kazu Hirata <kazu@cs.umass.edu> * gcc.c-torture/execute/builtin-bitops-1.c: When testing the diff --git a/gcc/testsuite/gcc.c-torture/execute/20030209-1.c b/gcc/testsuite/gcc.c-torture/execute/20030209-1.c new file mode 100644 index 0000000..c6aa77d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20030209-1.c @@ -0,0 +1,11 @@ +double x[100][100]; +int main () +{ + int i; + + i = 99; + x[i][0] = 42; + if (x[99][0] != 42) + abort (); + exit (0); +} diff --git a/gcc/toplev.c b/gcc/toplev.c index 840632a..a4cd1df 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2373,7 +2373,6 @@ rest_of_compilation (decl) int tem; int failure = 0; int rebuild_label_notes_after_reload; - int register_life_up_to_date; timevar_push (TV_REST_OF_COMPILATION); @@ -3227,10 +3226,6 @@ rest_of_compilation (decl) description to add extra information not needed previously. */ split_all_insns (1); - /* Any of the several passes since flow1 will have munged register - lifetime data a bit. */ - register_life_up_to_date = 0; - #ifdef OPTIMIZE_MODE_SWITCHING timevar_push (TV_MODE_SWITCH); @@ -3241,6 +3236,11 @@ rest_of_compilation (decl) timevar_pop (TV_MODE_SWITCH); #endif + /* Any of the several passes since flow1 will have munged register + lifetime data a bit. We need it to be up to date for scheduling + (see handling of reg_known_equiv in init_alias_analysis). */ + recompute_reg_usage (insns, !optimize_size); + timevar_push (TV_SCHED); #ifdef INSN_SCHEDULING @@ -3257,10 +3257,6 @@ rest_of_compilation (decl) schedule_insns (rtl_dump_file); close_dump_file (DFI_sched, print_rtl_with_bb, insns); - - /* Register lifetime information was updated as part of verifying - the schedule. */ - register_life_up_to_date = 1; } #endif timevar_pop (TV_SCHED); @@ -3280,9 +3276,6 @@ rest_of_compilation (decl) RUN_JUMP_AFTER_RELOAD records whether or not we need to rerun the jump optimizer after register allocation and reloading are finished. */ - if (! register_life_up_to_date) - recompute_reg_usage (insns, ! optimize_size); - if (flag_new_regalloc) { delete_trivially_dead_insns (insns, max_reg_num ()); |