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: Fix a tcb crash and a potential bug on mainline


On Friday 22 October 2004 21:27, Jeffrey A Law wrote:
> On Fri, 2004-10-22 at 13:16, Steven Bosscher wrote:
> > On Friday 22 October 2004 21:12, Jeffrey A Law wrote:
> > > I'm pretty sure we don't release PHIs and SSA_NAMEs in that code,
> > > but it shouldn't be terribly hard to add it in a way that is
> > > safe (since the unreachable block removal code is used by both
> > > trees and rtl).
> >
> > It's cfg-hookized via delete_basic_block (remove_bb in tree-cfg.c),
> > so it's probably enough to teach remove_bb about this.
>
> Can you give this a try?  I don't think I'll get to it today and
> I'd like to get this issue resolved.
>

OK, so here we go:

1) delete_unreachable_blocks calls delete_basic_block.
2) delete_basic_block calls remove_bb
3) remove_bb calls remove_phi_nodes_and_edges_for_unreachable_block
4) remove_phi_nodes_and_edges_for_unreachable_block calls remove_phi_node
5) remove_phi_node calls release_phi_node and release_ssa_name
6) -release_phi_node puts the PHIs in the freelist.
   -release_ssa_name puts the SSA_NAMEs in the freelist

So it should already work.

I'll see if I can verify that it indeed actually happens.

Gr.
Steven



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