This is the mail archive of the
mailing list for the GCC project.
Re: test patch for computed gotos
- From: Roger Sayle <roger at www dot eyesopen dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Brad Lucier <lucier at math dot purdue dot edu>, <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 9 Feb 2003 06:46:06 -0700 (MST)
- Subject: Re: test patch for computed gotos
On a more conciliatory note...
> It implements the idea I mentioned the other day about doing computed
> goto with a common computed goto block in order to reduce edge count,
> but with bb-reorder duplicating the block with the indirect jump at the
> last moment.
This could also make great use of a minor tweak to the new jump
bypassing pass. If on any of the edges to computed_goto_common_label,
GCSE can determine the label stored in computed_goto_common_reg, we
can short circuit the indirect jump itself and forward the incoming
edge directly to that label. In the unlikely event that all the
incoming edges can be forwarded, the indirect jump block becomes
I'm not familiar with indirect jumps, but I suspect that the only
thing that may need to be changed is in bypass_conditional_jumps:
else if (GET_CODE (insn) == JUMP_INSN)
if (any_condjump_p (insn) && onlyjump_p (insn))
changed |= bypass_block (bb, setcc, insn);
What do you think?
Roger Sayle, E-mail: firstname.lastname@example.org
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833