[PATCH] Fix cfg around tablejumps after tree_expand_cfg (PR rtl-optimization/18861)
Richard Henderson
rth@redhat.com
Thu Jan 6 01:13:00 GMT 2005
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~
More information about the Gcc-patches
mailing list