This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Fix register_life after pre-reload splitting



Hi,
in case mode switching pass is used and sched1 is not run, the
register_life_up_to_date is set to 1 by mode switching, but then mangled up by
unconditional splitter.  Similar case has been noticed by Geoff with
non-optimizing compilation.

This patch attempts to address both, by moving splitting before mode switching
and setting register_life_up_to_date to 0 after it.

Now the info is recomputed always.  I believe this step is cheap enought even
for non-optimizing compilation.  If not, I may make split_all_insns to return
true if info is mangled up.

So čec 14 14:55:26 CEST 2001  Jan Hubicka  <jh@suse.cz>

	* toplev.c (rest_of_compilation): Fix register_life_up_to_date
	handling; move unconditional splitting before mode switching.

*** toplev.c.old	Thu Jul 12 18:37:00 2001
--- toplev.c	Sat Jul 14 14:51:58 2001
*************** rest_of_compilation (decl)
*** 3327,3333 ****
    life_analysis (insns, rtl_dump_file, PROP_FINAL);
    timevar_pop (TV_FLOW);
  
-   register_life_up_to_date = 1;
    no_new_pseudos = 1;
  
    if (warn_uninitialized || extra_warnings)
--- 3327,3332 ----
*************** rest_of_compilation (decl)
*** 3414,3423 ****
        ggc_collect ();
      }
  
    /* Any of the several passes since flow1 will have munged register
       lifetime data a bit.  */
!   if (optimize > 0)
!     register_life_up_to_date = 0;
  
  #ifdef OPTIMIZE_MODE_SWITCHING
    timevar_push (TV_GCSE);
--- 3413,3425 ----
        ggc_collect ();
      }
  
+   /* Do unconditional splitting before register allocation to allow machine
+      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_GCSE);
*************** rest_of_compilation (decl)
*** 3434,3441 ****
  #endif
  
    timevar_push (TV_SCHED);
- 
-   split_all_insns (1);
  
  #ifdef INSN_SCHEDULING
  
--- 3436,3441 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]