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
This commit is contained in:
Richard Sandiford 2003-02-09 19:18:54 +00:00 committed by Richard Sandiford
parent 8275b011ca
commit 2382b79f35
4 changed files with 25 additions and 12 deletions

View File

@ -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> 2003-02-09 Richard Henderson <rth@redhat.com>
* libgcc-std.ver (__clztf2): New. * libgcc-std.ver (__clztf2): New.

View File

@ -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> 2003-02-09 Kazu Hirata <kazu@cs.umass.edu>
* gcc.c-torture/execute/builtin-bitops-1.c: When testing the * gcc.c-torture/execute/builtin-bitops-1.c: When testing the

View File

@ -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);
}

View File

@ -2373,7 +2373,6 @@ rest_of_compilation (decl)
int tem; int tem;
int failure = 0; int failure = 0;
int rebuild_label_notes_after_reload; int rebuild_label_notes_after_reload;
int register_life_up_to_date;
timevar_push (TV_REST_OF_COMPILATION); timevar_push (TV_REST_OF_COMPILATION);
@ -3227,10 +3226,6 @@ rest_of_compilation (decl)
description to add extra information not needed previously. */ description to add extra information not needed previously. */
split_all_insns (1); 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 #ifdef OPTIMIZE_MODE_SWITCHING
timevar_push (TV_MODE_SWITCH); timevar_push (TV_MODE_SWITCH);
@ -3241,6 +3236,11 @@ rest_of_compilation (decl)
timevar_pop (TV_MODE_SWITCH); timevar_pop (TV_MODE_SWITCH);
#endif #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); timevar_push (TV_SCHED);
#ifdef INSN_SCHEDULING #ifdef INSN_SCHEDULING
@ -3257,10 +3257,6 @@ rest_of_compilation (decl)
schedule_insns (rtl_dump_file); schedule_insns (rtl_dump_file);
close_dump_file (DFI_sched, print_rtl_with_bb, insns); 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 #endif
timevar_pop (TV_SCHED); 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 RUN_JUMP_AFTER_RELOAD records whether or not we need to rerun the
jump optimizer after register allocation and reloading are finished. */ 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) if (flag_new_regalloc)
{ {
delete_trivially_dead_insns (insns, max_reg_num ()); delete_trivially_dead_insns (insns, max_reg_num ());