On Fri, 17 Oct 2014, Richard Biener wrote:
> On Thu, 16 Oct 2014, Sebastian Pop wrote:
>
> > Richard Biener wrote:
> > > To give you an example how it looks like, the following code is
> > > generated for
> > >
> > > /* fold_negate_exprs convert - (~A) to A + 1. */
> > > (simplify
> > > (negat
On Thu, 16 Oct 2014, Sebastian Pop wrote:
> Richard Biener wrote:
> > To give you an example how it looks like, the following code is
> > generated for
> >
> > /* fold_negate_exprs convert - (~A) to A + 1. */
> > (simplify
> > (negate (bit_not @0))
> > (if (INTEGRAL_TYPE_P (type))
> > (plus
On Thu, Oct 16, 2014 at 09:14:18PM +0200, Jakub Jelinek wrote:
> On Thu, Oct 16, 2014 at 06:58:25PM +, Sebastian Pop wrote:
> > Richard Biener wrote:
> > > To give you an example how it looks like, the following code is
> > > generated for
> > >
> > > /* fold_negate_exprs convert - (~A) to A +
On Thu, Oct 16, 2014 at 06:58:25PM +, Sebastian Pop wrote:
> Richard Biener wrote:
> > To give you an example how it looks like, the following code is
> > generated for
> >
> > /* fold_negate_exprs convert - (~A) to A + 1. */
> > (simplify
> > (negate (bit_not @0))
> > (if (INTEGRAL_TYPE_P
Richard Biener wrote:
> To give you an example how it looks like, the following code is
> generated for
>
> /* fold_negate_exprs convert - (~A) to A + 1. */
> (simplify
> (negate (bit_not @0))
> (if (INTEGRAL_TYPE_P (type))
> (plus @0 { build_int_cst (TREE_TYPE (@0), 1); } )))
>
> tree
> gen
This hooks the machinery into the GENERIC folders in fold-const.c.
For re-simplification and tree building generic_simplify uses
the fold_buildN API which remains the API to use - this is also
why I don't expose generic_simplify in any header.
To give you an example how it looks like, the follow