On 12/01/15 12:42:48, Richard Biener wrote:
> On Mon, 30 Nov 2015, Gary Funck wrote:
> [...]
> > +  if (bitpos)
> > +    {
> > +      t_offset = size_int (bitpos / BITS_PER_UNIT);
> > +      if (offset)
> > +   t_offset = fold (build_binary_op (loc, PLUS_EXPR,
> > +                         offset, t_offset, 0));
> 
> Don't use fold ().  If you want a simplified tree don't go
> through build_binary_op but use fold_build2.  In this case
> it looks you want to use size_binop anyway.

OK

Regarding size_binop(), I'll need to review the code.
There are places that we need to retain sign and use
signed size types for example.

> > +    }
> > +  else
> > +    t_offset = offset;
> > +  {
> > +    const tree base_addr_type = TREE_TYPE (base_addr);
> > +    const enum tree_code cvt_op =
> > +   lang_hooks.types_compatible_p (upc_char_pts_type_node, base_addr_type)
> > +   ? NOP_EXPR : CONVERT_EXPR;
> 
> NOP and CONVERT are the same.

I haven't followed every GCC changes/re-org closely, but my impression
is that there has been a move to make NOP and CONVERT the same.
Is that correct?

We retain CONVERT's between UPC pointer-to-shared that are not
equivalent and that require some special logic to inter-operate
or convert them.  The UPC lowering pass handles those special cases.
Those conversions are not NOP's.  For example, a floating point
to integer conversion isn't a no-op.

Could use some additional guidance here.

Reply via email to