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] for PR 18316 (updated)


Hello,

> My one minor comment (and poor attempt at humour) is:
> 
> > + static void
> > + aff_combination_const (struct affine_tree_combination *comb, tree type,
> > + 		       unsigned HOST_WIDE_INT cst)
> > + {
> > +   comb->type = type;
> > +   comb->mask = 2;
> > +   comb->mask <<= TYPE_PRECISION (type) - 1;
> > +   comb->mask--;
> ...
> > + static void
> > + aff_combination_elt (struct affine_tree_combination *comb, tree type, tree elt)
> > + {
> > +   comb->type = type;
> > +   comb->mask = 2;
> > +   comb->mask <<= TYPE_PRECISION (type) - 1;
> > +   comb->mask--;
> 
> 
> There's no reason to write code in pseudo-SSA form, as the compiler will
> decompose expressions into a single operator per statement for you :)
> 
>     comb->mask = ((unsigned HOST_WIDE_INT) 2
>                   << (TYPE_PRECISION (type) - 1)) - 1;

the reason is that I don't quite like overly long lines like this one;
but I will make the change.

Zdenek


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