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-enable crossjumping before bb-reorder


> > That brings me to the question what happends to your testcase if you
> > add some float there so crossjumping gets called from reg-stack?
> 
> I didn't try.

Oops, reg-stack no longer calls crossjumping itself, instead relies on
the prebb-reorder crossjumping to cleanup.
Since it is not done, we lose quite a bit of code space in fp intensive
programs.
I am attaching the patch I would definitly like to see on the trunk/branch
after 3.1.0.  I am not sure if it is good idea to risc the 3.1.0 change
at the moment.

The patch to disable crossjumping is also not safe when the tablejump
is killed for diferent purpose - dead code is eliminated for instance.

Thu May  2 18:21:51 CEST 2002  Jan Hubicka  <jh@suse.cz>
	* cfgrtl.c (try_redirect_by_replacing_jump): Do not kill computed jumps
	post reload.
	* toplev.c (rest_of_compilation): Revert Richard's patch.

Index: cfgrtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cfgrtl.c,v
retrieving revision 1.40
diff -c -3 -p -r1.40 cfgrtl.c
*** cfgrtl.c	27 Apr 2002 06:41:38 -0000	1.40
--- cfgrtl.c	2 May 2002 16:21:47 -0000
*************** try_redirect_by_replacing_jump (e, targe
*** 713,719 ****
    basic_block src = e->src;
    rtx insn = src->end, kill_from;
    edge tmp;
!   rtx set;
    int fallthru = 0;
  
    /* Verify that all targets will be TARGET.  */
--- 713,719 ----
    basic_block src = e->src;
    rtx insn = src->end, kill_from;
    edge tmp;
!   rtx set, table;
    int fallthru = 0;
  
    /* Verify that all targets will be TARGET.  */
*************** try_redirect_by_replacing_jump (e, targe
*** 722,727 ****
--- 722,733 ----
        break;
  
    if (tmp || !onlyjump_p (insn))
+     return false;
+   if (reload_completed && JUMP_LABEL (insn)
+       && (table = NEXT_INSN (JUMP_LABEL (insn))) != NULL_RTX
+       && GET_CODE (table) == JUMP_INSN
+       && (GET_CODE (PATTERN (table)) == ADDR_VEC
+ 	  || GET_CODE (PATTERN (table)) == ADDR_DIFF_VEC))
      return false;
  
    /* Avoid removing branch with side effects.  */
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.618
diff -c -3 -p -r1.618 toplev.c
*** toplev.c	30 Apr 2002 23:13:34 -0000	1.618
--- toplev.c	2 May 2002 16:21:48 -0000
*************** rest_of_compilation (decl)
*** 3313,3319 ****
  	 splitting possibly introduced more crossjumping oppurtuntities.
  	 Except that we can't actually run crossjumping without running 
  	 another DCE pass, which we can't do after reg-stack.  */
!       cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK);
        if (flag_reorder_blocks)
  	{
  	  reorder_basic_blocks ();
--- 3313,3320 ----
  	 splitting possibly introduced more crossjumping oppurtuntities.
  	 Except that we can't actually run crossjumping without running 
  	 another DCE pass, which we can't do after reg-stack.  */
!       cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK
! 		   | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0));
        if (flag_reorder_blocks)
  	{
  	  reorder_basic_blocks ();


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