This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Make the world a bit safer for cfglayout mode
- From: Roger Sayle <roger at eyesopen dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 24 Nov 2006 18:31:37 -0700 (MST)
- Subject: Re: [PATCH] Make the world a bit safer for cfglayout mode
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