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]

[PATCH] Don't run basic block reordering when -Os


BBRO creates extra jump instructions and also extra barriers
which can create cache line alignment directives, depending 
on the target processor. So, it should be disabled
when optimizing for size.

2002-07-31  Toshiyasu Morita  <toshiyasu.morita@hsa.hitachi.com>

	* toplev.c (rest_of_compilation): Don't reorder basic blocks
	when optimizing for size.

*** toplev.c.bak	Wed Jul 31 14:31:47 2002
--- toplev.c	Wed Jul 31 14:32:47 2002
*************** rest_of_compilation (decl)
*** 3463,3469 ****
  	 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 ();
  	  cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK);
--- 3463,3472 ----
  	 another DCE pass, which we can't do after reg-stack.  */
        cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK
  		   | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0));
! 
!       /* Don't reorder blocks when optimizing for size because extra
!          jump insns may be created; also barrier may create extra padding.  */
!       if (flag_reorder_blocks && ! optimize_size)
  	{
  	  reorder_basic_blocks ();
  	  cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK);


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