This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Don't run basic block reordering when -Os
- From: tm <tm at mail dot kloo dot net>
- To: gcc-patches at gcc dot gnu dot org
- Cc: tm at kloo dot net, shumpei dot kawasaki at hsa dot hitachi dot com
- Date: Wed, 31 Jul 2002 14:37:00 -0700 (PDT)
- Subject: [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);