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] Fix force_nonfallthru_and_redirect


Hello,

cfglayout tries to use force_nonfallthru_and_redirect to fix cases when
dead jumptable would emerge on fallthru edge; but
force_nonfallthru_and_redirect contains a special handling of jumptables
that does not check whether it is dead, thus making it useless.

Zdenek

	* cfgrtl.c (force_nonfallthru_and_redirect): Detect case of dead
	jumptable.

Index: cfgrtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgrtl.c,v
retrieving revision 1.91
diff -c -3 -p -r1.91 cfgrtl.c
*** cfgrtl.c	3 Jul 2003 18:40:27 -0000	1.91
--- cfgrtl.c	5 Jul 2003 09:34:25 -0000
*************** force_nonfallthru_and_redirect (edge e, 
*** 1045,1050 ****
--- 1045,1051 ----
        /* ... and ADDR_VECs.  */
        if (note != NULL
  	  && GET_CODE (note) == CODE_LABEL
+ 	  && LABEL_NUSES (note) != 0
  	  && NEXT_INSN (note)
  	  && GET_CODE (NEXT_INSN (note)) == JUMP_INSN
  	  && (GET_CODE (PATTERN (NEXT_INSN (note))) == ADDR_DIFF_VEC


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