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: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>, 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: Thu, 6 Jan 2005 16:39:13 -0500
- Subject: Re: [PATCH] Fix cfg around tablejumps after tree_expand_cfg (PR rtl-optimization/18861)
- References: <20050105165140.GH10340@devserv.devel.redhat.com> <20050106011311.GE29359@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jan 05, 2005 at 05:13:11PM -0800, Richard Henderson wrote:
> > + /* 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?
I have copied whatever make_edges does there.
condjump_label certainly doesn't handle ARM casesi_internal instruction
that this is supposed to handle:
(jump_insn 18 17 19 1 (parallel [
(set (pc)
(if_then_else (leu (reg:SI 104)
(const_int 5 [0x5]))
(mem:SI (plus:SI (mult:SI (reg:SI 104)
(const_int 4 [0x4]))
(label_ref 19)) [0 S4 A32])
(label_ref 22)))
(clobber (reg:CC 24 cc))
(use (label_ref 19))
]) -1 (nil)
(nil))
which is not condjump_label, as that function needs one branch
of the IF_THEN_ELSE to be (pc) and the other (label_ref ...),
while this has has one branch (mem ...) and the other (label_ref ...).
Jakub