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: [PATCH] Add un-distribution capabilities to tree reassoc (3rd try)


On Thu, 14 Aug 2008, Xinliang David Li wrote:

> 
> > > >          lhs = gimple_assign_lhs (stmt);
> > > >          rhs1 = gimple_assign_rhs1 (stmt);
> > > > --- 1760,1775 ----
> > > >          /* If this was part of an already processed statement,
> > > >             we don't need to touch it again. */
> > > >          if (gimple_visited_p (stmt))
> > > > !           {
> > > > !             /* This statement might have become dead because of
> > > > previous
> > > > !                reassociations.  */
> > > > !             if (has_zero_uses (gimple_get_lhs (stmt)))
> > > > !               {
> > > > !                 gsi_remove (&gsi, true);
> > > > !                 release_defs (stmt);
> 
> There seem to be a minor problem -- there needs to be an gsi_end_p check   and
> break after the removal.

Just by visual inspection or do you have a testcase?  As we are walking
from the end of the basic-block to the beginning we shouldn't hit the
last statement again (note this is guarded by gimple_visited_p).

Richard.


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