This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: test patch for computed gotos


Hi Richard,
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
dead code.

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);
                break;
              }


What do you think?

Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]