[PATCH] Make the world a bit safer for cfglayout mode

Roger Sayle roger@eyesopen.com
Sat Nov 25 02:45:00 GMT 2006


Hi Steven,

On Fri, 24 Nov 2006, Steven Bosscher wrote:
> >        * jump.c (mark_all_labels): Work in cfglayout mode.
> >        * cfgcleanup.c (cleanup_cfg): Do not call delete_dead_jumptables
> >        when in cfglayout mode, because there are no dead jumptables
> >        visible.
> >        * cfgrtl.c (commit_edge_insertions): Do not allow insertion
> >        of instructions with control flow insns when in cfglayout mode.

This is OK for mainline.


> +	  for (insn = bb->il.rtl->header; insn; insn = NEXT_INSN (insn))
> ...
> +	  for (insn = bb->il.rtl->footer; insn; insn = NEXT_INSN (insn))

I'm a little surprised that we don't have BB_RTL_HEADER and BB_RTL_FOOTER
macros to access these fields, but it looks like every where currently
uses the above idiom.


Is there an easy way of identifying which passes insert RTL control flow
insns on edges?  If we had a list of places that used this dubious
functionality, we could priortize their reorganization/clean-up, add
an assertion to insert_insn_on_edge and simplify this aspect of
commit_edge_insertions.

Roger
--



More information about the Gcc-patches mailing list