This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] [PATCH]: Fix DCE not updating bb->end_tree_p
On Tue, 2003-07-15 at 18:27, Diego Novillo wrote:
> On Tue, 2003-07-15 at 18:25, Andrew MacLeod wrote:
>
> > > + {
> > > + block_stmt_iterator bsi;
> > > + bsi = bsi_start (bb);
> > > + while (bsi_stmt_ptr (bsi) != stmt_p)
> > > + bsi_next_in_bb (&bsi, bb);
> > > + bsi_prev (&bsi);
> > > + bb->end_tree_p = bsi_container (bsi);
> > > + }
> > > +
> > > stmt->common.ann = NULL;
> > >
> > > /* The RHS of a MODIFY_EXPR has an annotation for the benefit of
> >
> > gah. You realize that bsi_prev() currently redoes what you just did all
> > over again, so you are currently iterating from bsi_start() twice?
> >
> Oh, right, I missed that, sorry :/
>
> We really, really, really need to change the way we link statements.
>
And I also noticed that isnt going to be easy when we have things like
linearize_control_flow that dont use the iterators... I was going to say
bsi_remove is the right place to be doing this, it'd be easier there.
But linearize uses direct references and calls remove_stmt rather than
iterators so we can't do that right now.
We need to convert everything to iterators before we can even think
about switching. I plan at some point to do the exercise of seeing how
much needs to be changed, but havent had time yet. Its a pet project :-)
Andrew