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: [tree-ssa] [PATCH]: Fix DCE not updating bb->end_tree_p



On Tue, 15 Jul 2003, Diego Novillo wrote:

> On Tue, 2003-07-15 at 16:58, Daniel Berlin wrote:
>
> > +  /* Update end_tree_p when stmt_p is the end of the tree.  We don't
> > +     need to handle the COMPOUND_EXPR case, since that's handled
> > +     below.  We don't need to handle the one statement bb case, since
> > +     we will remove the bb anyway.  */
> > +  if (bb && bb->end_tree_p == stmt_p && bb->head_tree_p != stmt_p
> > +      && TREE_CODE (*stmt_p) != COMPOUND_EXPR)
> >
> One predicate per line, please.
Hotcha.

>
> > +    {
> > +      block_stmt_iterator bsi;
> > +      bsi = bsi_start (bb);
> > +      while (bsi_stmt_ptr (bsi) != stmt_p)
> > +        bsi_next_in_bb (&bsi, bb);
> > +      bsi_prev (&bsi);
> >
> Ouch, but I guess there's no other way around it.
Yeah, unfortunately, there's isn't.

>
> > +      bb->end_tree_p = bsi_container (bsi);
> > +    }
> > +
> This should be bsi_stmt_ptr (bsi).
Nope, that won't work, that was my first try.


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