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]
Other format: [Raw text]

Re: New bootstrap failure on ARM systems


> 
> The cost on a full 3-stage bootstrap for c/c++/objc/g77/java+building 
> libraries is about 1.2% compared with the last time I did a full bootstrap 
> (2003/12/19).  Which isn't especially good news, but isn't too bad (some 
> of that may be extra java code to compile).
> 
> It does at least bootstrap now though.
> 
> Native regression tests haven't been run (my machine tripped a kernel bug 
> again last night), but cross tests on arm-elf have.

Hi,
this seems to be the best of all bad sollutions I was able to come with.  I
moved the crossjumping before if conversion.  This improves code as
crossjumping seems to make if conversion better.
Basic block reordering now does just "normal" cleanup that shall not fire that
often (especially if ifcvt didn't any changes) and I recompute the liveness
completely for CE targets.

Does this look acceptable?  On i386 it makes small speedup and it fixes the
testcase I have.  It should be less expensive than the patch Richard
tested.

Honza

2004-01-10  Jan Hubicka  <jh@suse.cz>
	* toplev.c (HAVE_conditional_execution): Provide default.
	(rest_of_handle_reorder_blocks): For conditional_execution target
	update liveness once after all transformations
	(rest_of_compilation): Do crossjumping before ce3.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.860
diff -c -3 -p -r1.860 toplev.c
*** toplev.c	6 Jan 2004 16:51:20 -0000	1.860
--- toplev.c	9 Jan 2004 23:24:52 -0000
*************** Software Foundation, 59 Temple Place - S
*** 96,101 ****
--- 96,105 ----
  				   declarations for e.g. AIX 4.x.  */
  #endif
  
+ #ifndef HAVE_conditional_execution
+ #define HAVE_conditional_execution 0
+ #endif
+ 
  /* Carry information from ASM_DECLARE_OBJECT_NAME
     to ASM_FINISH_DECLARE_OBJECT.  */
  
*************** rest_of_handle_regrename (tree decl, rtx
*** 2294,2305 ****
  static void
  rest_of_handle_reorder_blocks (tree decl, rtx insns)
  {
    open_dump_file (DFI_bbro, decl);
  
    /* Last attempt to optimize CFG, as scheduling, peepholing and insn
       splitting possibly introduced more crossjumping opportunities.  */
!   cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE
! 	       | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0));
  
    if (flag_sched2_use_traces && flag_schedule_insns_after_reload)
      tracer ();
--- 2298,2311 ----
  static void
  rest_of_handle_reorder_blocks (tree decl, rtx insns)
  {
+   bool changed;
    open_dump_file (DFI_bbro, decl);
  
    /* Last attempt to optimize CFG, as scheduling, peepholing and insn
       splitting possibly introduced more crossjumping opportunities.  */
!   changed |= cleanup_cfg (CLEANUP_EXPENSIVE
! 		  	  | (!HAVE_conditional_execution
! 			     ? CLEANUP_UPDATE_LIFE : 0));
  
    if (flag_sched2_use_traces && flag_schedule_insns_after_reload)
      tracer ();
*************** rest_of_handle_reorder_blocks (tree decl
*** 2307,2314 ****
      reorder_basic_blocks ();
    if (flag_reorder_blocks
        || (flag_sched2_use_traces && flag_schedule_insns_after_reload))
!     cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE);
! 
    close_dump_file (DFI_bbro, print_rtl_with_bb, insns);
  }
  
--- 2313,2328 ----
      reorder_basic_blocks ();
    if (flag_reorder_blocks
        || (flag_sched2_use_traces && flag_schedule_insns_after_reload))
!     changed |= cleanup_cfg (CLEANUP_EXPENSIVE
! 			    | (!HAVE_conditional_execution
! 			       ? CLEANUP_UPDATE_LIFE : 0));
! 
!   /* On conditional execution targets we can not update the life cheaply, so
!      we deffer the updating to after both cleanups.  This may lose some cases
!      but should not be terribly bad.  */
!   if (changed && HAVE_conditional_execution)
!     update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
! 		      PROP_DEATH_NOTES | PROP_REG_INFO);
    close_dump_file (DFI_bbro, print_rtl_with_bb, insns);
  }
  
*************** rest_of_compilation (tree decl)
*** 3459,3474 ****
      }
  #endif
  
    if (flag_if_conversion2)
      {
        timevar_push (TV_IFCVT2);
-       open_dump_file (DFI_ce3, decl);
  
        if_convert (1);
  
-       close_dump_file (DFI_ce3, print_rtl_with_bb, insns);
        timevar_pop (TV_IFCVT2);
      }
  
    if (optimize > 0)
      {
--- 3473,3494 ----
      }
  #endif
  
+   open_dump_file (DFI_ce3, decl);
+   if (optimize)
+     /* Last attempt to optimize CFG, as scheduling, peepholing and insn
+        splitting possibly introduced more crossjumping opportunities.  */
+     cleanup_cfg (CLEANUP_EXPENSIVE
+ 		 | CLEANUP_UPDATE_LIFE 
+ 		 | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0));
    if (flag_if_conversion2)
      {
        timevar_push (TV_IFCVT2);
  
        if_convert (1);
  
        timevar_pop (TV_IFCVT2);
      }
+   close_dump_file (DFI_ce3, print_rtl_with_bb, insns);
  
    if (optimize > 0)
      {


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