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:22, Daniel Berlin wrote:
>
>
> On Tue, 15 Jul 2003, Diego Novillo wrote:
>
> > On Tue, 2003-07-15 at 18:15, Daniel Berlin wrote:
> >
> > > > > + bb->end_tree_p = bsi_container (bsi);
> > > > > + }
> > > > > +
> > > > This should be bsi_stmt_ptr (bsi).
> > > Nope, that won't work, that was my first try.
> > >
> > Oh, probably so that we can start reverse iterators at block's end.
> Right.
> > OK
> > then. Out of curiosity, remember what was the failure?
> As you mentioned above. if you point it at the statement, rather than the
> compound_expr containing it, it can't go backwards.
>
> I think bsi_prev is actually broken, in that it doesn't do the opposite of
> bsi_next/bsi_stmt in this regard (IE it should look in the first operand
> of a compound_expr, like bsi_stmt would, when trying to find the prev)
>
heh? bsi_prev() simply uses bsi_next() to iterate from bsi_start()
until it points to the required statement, and then uses whatever the
iterator was before we stepped into bsi_next() to get to the current
stmt. So it should be the exact previous iterator...
Andrew