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]: Eliminate useless stores patch


On Mon, 2005-07-11 at 09:45 -0400, Diego Novillo wrote:
> On Wed, Jul 06, 2005 at 11:04:22PM -0400, Daniel Berlin wrote:
> 
> > +static tree 
> > +follow_copies_till_vuse (tree start)
> > +{
> > +  if (is_copy_stmt (start) && ZERO_SSA_OPERANDS (start, SSA_OP_VIRTUAL_USES))
> > +    {
> > +      tree rhs, defstmt;
> > +      rhs = TREE_OPERAND (start, 1);
> > +      defstmt = SSA_NAME_DEF_STMT (rhs);
> > +      return follow_copies_till_vuse (defstmt);
> > +    }
> > +  return NULL;
> > +}
> > +
> Huh?  How will this ever return anything *but* NULL?
Fixed in a future version :)
> 
> > +      block_stmt_iterator bsi;
> > +      for (bsi = bsi_start (bb);
> > +	   !bsi_end_p (bsi);)
> >
> No line break.
Fixed.

> 
> > +	  if (found)
> > +	    {	   
> > +	      if (!VUSE_OPS (found) || VUSE_OPS (found)->next
> >
> No need to access operand internals: ZERO_SSA_OPERANDS (stmt, SSA_OP_VUSE)
Yeah, fixed.

> You could also call stmt_makes_single_load(), but that may be
> overkill.
> 
> OK with those changes.  Also check the formatting, some comments
> seemed longer than 80 columns 

None are, the longest is 78 chars (emacs auto-fill :P)

> and you have the usual lack of
> vertical spacing.


> 
> 
> Diego.


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