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: RFA: Use fixup_fallthru_exit_predecessor only for


> $ /tmp/cvs/gcc-test-200406141500/Build/gcc/xgcc -B/tmp/cvs/gcc-test-200406141500/Build/gcc/ /tmp/cvs/gcc-test-200406141500/gcc/testsuite/gcc.c-torture/execute/20030120-2.c -w  -O1   -lm   -o /tmp/cvs/gcc-test-200406141500/Build/gcc/testsuite/20030120-2.x1
> $ /tmp/cvs/gcc-test-200406141500/Build/gcc/testsuite/20030120-2.x1

try_simplify_condjump uses can_fallthru to determine if one block precedes another.
This doesn't work any more when the latter block is the exit block.

2004-06-16  J"orn Rennecke <joern.rennecke@superh.com>

	* cfgcleanup.c (try_simplify_condjump): Update test to make
	sure we have a conditional branch around am unconditional branch.

Index: cfgcleanup.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgcleanup.c,v
retrieving revision 1.117
diff -p -r1.117 cfgcleanup.c
*** cfgcleanup.c	3 Jun 2004 12:07:38 -0000	1.117
--- cfgcleanup.c	15 Jun 2004 23:03:02 -0000
*************** try_simplify_condjump (basic_block cbran
*** 163,169 ****
       unconditional branch.  */
    cbranch_dest_block = cbranch_jump_edge->dest;
  
!   if (!can_fallthru (jump_block, cbranch_dest_block))
      return false;
  
    /* Invert the conditional branch.  */
--- 163,170 ----
       unconditional branch.  */
    cbranch_dest_block = cbranch_jump_edge->dest;
  
!   if (cbranch_dest_block == EXIT_BLOCK_PTR
!       || !can_fallthru (jump_block, cbranch_dest_block))
      return false;
  
    /* Invert the conditional branch.  */


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