This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix PR opt/8300
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 23 Apr 2003 21:15:13 -0700
- Subject: Fix PR opt/8300
This is followup to
http://gcc.gnu.org/ml/gcc-patches/2003-03/msg02090.html
The problem that Eric saw is that his patch did not
expand the reg_info array to accomodate the new pseudos.
For mainline we could perhaps do less work -- e.g. keep reg
life info up to date by hand -- which would allow us to
go back to using update_life_info_in_dirty_blocks, but
that's not appropriate for the branch.
r~
* toplev.c (rest_of_compilation): Delay no_new_pseudos until
after initialize_uninitialized_subregs; update reg info assuming
new pseudos were created.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.690.2.15
diff -c -p -d -u -r1.690.2.15 toplev.c
--- toplev.c 2 Apr 2003 07:14:28 -0000 1.690.2.15
+++ toplev.c 24 Apr 2003 04:06:55 -0000
@@ -3083,8 +3083,6 @@ rest_of_compilation (decl)
| (flag_thread_jumps ? CLEANUP_THREADING : 0));
timevar_pop (TV_FLOW);
- no_new_pseudos = 1;
-
if (warn_uninitialized || extra_warnings)
{
uninitialized_vars_warning (DECL_INITIAL (decl));
@@ -3094,16 +3092,18 @@ rest_of_compilation (decl)
if (optimize)
{
- clear_bb_flags ();
if (!flag_new_regalloc && initialize_uninitialized_subregs ())
{
- /* Insns were inserted, so things might look a bit different. */
+ /* Insns were inserted, and possibly pseudos created, so
+ things might look a bit different. */
insns = get_insns ();
- update_life_info_in_dirty_blocks (UPDATE_LIFE_GLOBAL_RM_NOTES,
- PROP_LOG_LINKS | PROP_REG_INFO
- | PROP_DEATH_NOTES);
+ allocate_reg_life_data ();
+ update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
+ PROP_LOG_LINKS | PROP_REG_INFO | PROP_DEATH_NOTES);
}
}
+
+ no_new_pseudos = 1;
close_dump_file (DFI_life, print_rtl_with_bb, insns);