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]

forwarder_block_p speedup



Hi,
this patch speeds up somewhat the forwarder_block_p, as it is one of top
CPU eaters in Brad's testcase.

I will reduce the number of forwarder_block_p calls too later.

Honza

Wed Oct 17 17:32:11 CEST 2001  Jan Hubicka  <jh@suse.cz>

	* cfganal.c (forwarder_block_p): Avoid active_insn_p calls.

*** cfganal.c.old	Wed Oct 17 16:20:07 2001
--- cfganal.c	Wed Oct 17 16:21:21 2001
*************** forwarder_block_p (bb)
*** 67,78 ****
  
    while (insn != bb->end)
      {
!       if (active_insn_p (insn))
  	return false;
        insn = NEXT_INSN (insn);
      }
!   return (!active_insn_p (insn)
! 	  || (GET_CODE (insn) == JUMP_INSN && onlyjump_p (insn)));
  }
  
  /* Return nonzero if we can reach target from src by falling trought.  */
--- 67,79 ----
  
    while (insn != bb->end)
      {
!       if (INSN_P (insn) && active_insn_p (insn))
  	return false;
        insn = NEXT_INSN (insn);
      }
!   return (!INSN_P (insn)
! 	  || (GET_CODE (insn) == JUMP_INSN && simplejump_p (insn))
! 	  || !active_insn_p (insn));
  }
  
  /* Return nonzero if we can reach target from src by falling trought.  */


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