This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix cfg around tablejumps after tree_expand_cfg (PR rtl-optimization/18861)
- From: Richard Henderson <rth at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>, Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Jan 2005 17:13:11 -0800
- Subject: Re: [PATCH] Fix cfg around tablejumps after tree_expand_cfg (PR rtl-optimization/18861)
- References: <20050105165140.GH10340@devserv.devel.redhat.com>
On Wed, Jan 05, 2005 at 11:51:40AM -0500, Jakub Jelinek wrote:
> PR rtl-optimization/18861
> * cfgbuild.c (BLOCK_USED_BY_TABLEJUMP): Define.
> (FULL_STATE): Define.
> (mark_tablejump_edge): New function.
> (purge_dead_tablejump_edges): New function.
> (find_bb_boundaries): Use it.
Ok, except,
> + /* Some targets (eg, ARM) emit a conditional jump that also
> + contains the out-of-range target. Scan for these and
> + add an edge if necessary. */
> + if ((tmp = single_set (insn)) != NULL
> + && SET_DEST (tmp) == pc_rtx
> + && GET_CODE (SET_SRC (tmp)) == IF_THEN_ELSE
> + && GET_CODE (XEXP (SET_SRC (tmp), 2)) == LABEL_REF)
> + mark_tablejump_edge (XEXP (XEXP (SET_SRC (tmp), 2), 0));
condjump_label?
r~