This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix force_nonfallthru_and_redirect
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: jh at suse dot cz, rth at redhat dot com
- Date: Sat, 5 Jul 2003 11:37:43 +0200
- Subject: [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