Re: [GSoC] decision tree first steps

2014-06-23 Thread Richard Biener
On Mon, Jun 23, 2014 at 3:01 PM, Prathamesh Kulkarni wrote: > On Mon, Jun 23, 2014 at 5:58 PM, Richard Biener > wrote: >> On Mon, Jun 23, 2014 at 1:51 PM, Prathamesh Kulkarni >> wrote: >>> On Mon, Jun 23, 2014 at 3:38 PM, Richard Biener >>> wrote: On Mon, Jun 23, 2014 at 10:26 AM, Prathame

Re: [GSoC] decision tree first steps

2014-06-23 Thread Prathamesh Kulkarni
On Mon, Jun 23, 2014 at 5:58 PM, Richard Biener wrote: > On Mon, Jun 23, 2014 at 1:51 PM, Prathamesh Kulkarni > wrote: >> On Mon, Jun 23, 2014 at 3:38 PM, Richard Biener >> wrote: >>> On Mon, Jun 23, 2014 at 10:26 AM, Prathamesh Kulkarni >>> wrote: On Thu, Jun 19, 2014 at 7:53 PM, Prathame

Re: [GSoC] decision tree first steps

2014-06-23 Thread Richard Biener
On Mon, Jun 23, 2014 at 1:51 PM, Prathamesh Kulkarni wrote: > On Mon, Jun 23, 2014 at 3:38 PM, Richard Biener > wrote: >> On Mon, Jun 23, 2014 at 10:26 AM, Prathamesh Kulkarni >> wrote: >>> On Thu, Jun 19, 2014 at 7:53 PM, Prathamesh Kulkarni >>> wrote: On Thu, Jun 19, 2014 at 4:12 PM, Pra

Re: [GSoC] decision tree first steps

2014-06-23 Thread Richard Biener
On Mon, Jun 23, 2014 at 10:26 AM, Prathamesh Kulkarni wrote: > On Thu, Jun 19, 2014 at 7:53 PM, Prathamesh Kulkarni > wrote: >> On Thu, Jun 19, 2014 at 4:12 PM, Prathamesh Kulkarni >> wrote: >>> On Thu, Jun 19, 2014 at 2:37 PM, Prathamesh Kulkarni >>> wrote: Replying to the last mail in the th

Re: [GSoC] decision tree first steps

2014-06-18 Thread Richard Biener
On Wed, Jun 18, 2014 at 11:21 AM, Prathamesh Kulkarni wrote: > On Tue, Jun 17, 2014 at 3:15 PM, Richard Biener > wrote: >> >> On Tue, Jun 17, 2014 at 12:21 AM, Prathamesh Kulkarni >> wrote: >> > On Mon, Jun 16, 2014 at 4:45 PM, Richard Biener >> > wrote: >> >> >> >> > * Patterns requiring GENER

Re: [GSoC] decision tree first steps

2014-06-18 Thread Prathamesh Kulkarni
On Tue, Jun 17, 2014 at 3:15 PM, Richard Biener wrote: > > On Tue, Jun 17, 2014 at 12:21 AM, Prathamesh Kulkarni > wrote: > > On Mon, Jun 16, 2014 at 4:45 PM, Richard Biener > > wrote: > >> > >> > * Patterns requiring GENERIC support like cond_expr > >> > I am not sure about how to handle these

Re: [GSoC] decision tree first steps

2014-06-17 Thread Richard Biener
On Tue, Jun 17, 2014 at 12:21 AM, Prathamesh Kulkarni wrote: > On Mon, Jun 16, 2014 at 4:45 PM, Richard Biener > wrote: >> >> > * Patterns requiring GENERIC support like cond_expr >> > I am not sure about how to handle these patterns. I was thinking about >> > handling them after we have >> > GEN

Re: [GSoC] decision tree first steps

2014-06-16 Thread Michael Matz
Hi, On Mon, 16 Jun 2014, Richard Biener wrote: > For > > (match_and_simplify > (MINUS_EXPR @2 (PLUS_EXPR@2 @0 @1)) > @1) Btw, this just triggered my eye. So with lumping the predicate to the capture without special separator syntax, it means that there's a difference between "minus_expr

Re: [GSoC] decision tree first steps

2014-06-16 Thread Richard Biener
On Mon, Jun 16, 2014 at 1:07 AM, Prathamesh Kulkarni wrote: > On Sat, Jun 14, 2014 at 12:43 PM, Richard Biener > wrote: > I have attached patch that tries to implement decision tree using the > above algorithm. > (haven't done for built-in function yet, but that would be similar to > expr, so i g

Re: [GSoC] decision tree first steps

2014-06-14 Thread Richard Biener
On June 13, 2014 11:48:13 PM CEST, Prathamesh Kulkarni wrote: >On Thu, Jun 12, 2014 at 4:26 PM, Richard Biener > wrote: >> On Wed, Jun 11, 2014 at 4:09 PM, Prathamesh Kulkarni >> wrote: >>> On 6/11/14, Richard Biener wrote: On Wed, Jun 11, 2014 at 12:53 PM, Richard Biener wrote:

Re: [GSoC] decision tree first steps

2014-06-13 Thread Richard Biener
On June 13, 2014 11:48:13 PM CEST, Prathamesh Kulkarni wrote: >On Thu, Jun 12, 2014 at 4:26 PM, Richard Biener > wrote: >> On Wed, Jun 11, 2014 at 4:09 PM, Prathamesh Kulkarni >> wrote: >>> On 6/11/14, Richard Biener wrote: On Wed, Jun 11, 2014 at 12:53 PM, Richard Biener wrote:

Re: [GSoC] decision tree first steps

2014-06-13 Thread Prathamesh Kulkarni
On Thu, Jun 12, 2014 at 4:26 PM, Richard Biener wrote: > On Wed, Jun 11, 2014 at 4:09 PM, Prathamesh Kulkarni > wrote: >> On 6/11/14, Richard Biener wrote: >>> On Wed, Jun 11, 2014 at 12:53 PM, Richard Biener >>> wrote: On Wed, Jun 11, 2014 at 10:51 AM, Richard Biener wrote: > On

Re: [GSoC] decision tree first steps

2014-06-12 Thread Richard Biener
On Wed, Jun 11, 2014 at 4:09 PM, Prathamesh Kulkarni wrote: > On 6/11/14, Richard Biener wrote: >> On Wed, Jun 11, 2014 at 12:53 PM, Richard Biener >> wrote: >>> On Wed, Jun 11, 2014 at 10:51 AM, Richard Biener >>> wrote: On Tue, Jun 10, 2014 at 1:57 PM, Richard Biener wrote: [...sni

Re: [GSoC] decision tree first steps

2014-06-11 Thread Prathamesh Kulkarni
On 6/11/14, Prathamesh Kulkarni wrote: > On 6/11/14, Richard Biener wrote: >> On Wed, Jun 11, 2014 at 12:53 PM, Richard Biener >> wrote: >>> On Wed, Jun 11, 2014 at 10:51 AM, Richard Biener >>> wrote: On Tue, Jun 10, 2014 at 1:57 PM, Richard Biener wrote: > On Tue, Jun 10, 2014 a

Re: [GSoC] decision tree first steps

2014-06-11 Thread Prathamesh Kulkarni
On 6/11/14, Richard Biener wrote: > On Wed, Jun 11, 2014 at 12:53 PM, Richard Biener > wrote: >> On Wed, Jun 11, 2014 at 10:51 AM, Richard Biener >> wrote: >>> On Tue, Jun 10, 2014 at 1:57 PM, Richard Biener >>> wrote: On Tue, Jun 10, 2014 at 1:06 PM, Prathamesh Kulkarni wrote: >

Re: [GSoC] decision tree first steps

2014-06-11 Thread Richard Biener
On Wed, Jun 11, 2014 at 12:53 PM, Richard Biener wrote: > On Wed, Jun 11, 2014 at 10:51 AM, Richard Biener > wrote: >> On Tue, Jun 10, 2014 at 1:57 PM, Richard Biener >> wrote: >>> On Tue, Jun 10, 2014 at 1:06 PM, Prathamesh Kulkarni >>> wrote: On Fri, Jun 6, 2014 at 7:18 PM, Richard Biene

Re: [GSoC] decision tree first steps

2014-06-11 Thread Richard Biener
On Wed, Jun 11, 2014 at 10:51 AM, Richard Biener wrote: > On Tue, Jun 10, 2014 at 1:57 PM, Richard Biener > wrote: >> On Tue, Jun 10, 2014 at 1:06 PM, Prathamesh Kulkarni >> wrote: >>> On Fri, Jun 6, 2014 at 7:18 PM, Richard Biener >>> wrote: On Fri, Jun 6, 2014 at 12:02 PM, Richard Biener

Re: [GSoC] decision tree first steps

2014-06-11 Thread Richard Biener
On Tue, Jun 10, 2014 at 1:57 PM, Richard Biener wrote: > On Tue, Jun 10, 2014 at 1:06 PM, Prathamesh Kulkarni > wrote: >> On Fri, Jun 6, 2014 at 7:18 PM, Richard Biener >> wrote: >>> On Fri, Jun 6, 2014 at 12:02 PM, Richard Biener >>> wrote: On Fri, Jun 6, 2014 at 11:02 AM, Prathamesh Kulk

Re: [GSoC] decision tree first steps

2014-06-10 Thread Richard Biener
On Tue, Jun 10, 2014 at 1:06 PM, Prathamesh Kulkarni wrote: > On Fri, Jun 6, 2014 at 7:18 PM, Richard Biener > wrote: >> On Fri, Jun 6, 2014 at 12:02 PM, Richard Biener >> wrote: >>> On Fri, Jun 6, 2014 at 11:02 AM, Prathamesh Kulkarni >>> wrote: On Mon, Jun 2, 2014 at 6:14 PM, Richard Bie

Re: [GSoC] decision tree first steps

2014-06-06 Thread Richard Biener
On Fri, Jun 6, 2014 at 12:02 PM, Richard Biener wrote: > On Fri, Jun 6, 2014 at 11:02 AM, Prathamesh Kulkarni > wrote: >> On Mon, Jun 2, 2014 at 6:14 PM, Richard Biener >> wrote: >>> On Mon, Jun 2, 2014 at 1:16 PM, Prathamesh Kulkarni >>> wrote: I have few questions regarding genmatch: >>>

Re: [GSoC] decision tree first steps

2014-06-06 Thread Richard Biener
On Fri, Jun 6, 2014 at 11:02 AM, Prathamesh Kulkarni wrote: > On Mon, Jun 2, 2014 at 6:14 PM, Richard Biener > wrote: >> On Mon, Jun 2, 2014 at 1:16 PM, Prathamesh Kulkarni >> wrote: >>> I have few questions regarding genmatch: >>> >>> a) Why is 4 hard-coded here: ? >>> in write_nary_simplifiers

Re: [GSoC] decision tree first steps

2014-06-06 Thread Prathamesh Kulkarni
On Mon, Jun 2, 2014 at 6:14 PM, Richard Biener wrote: > On Mon, Jun 2, 2014 at 1:16 PM, Prathamesh Kulkarni > wrote: >> I have few questions regarding genmatch: >> >> a) Why is 4 hard-coded here: ? >> in write_nary_simplifiers: >> fprintf (f, " tree captures[4] = {};\n"); > > Magic number (

Re: [GSoC] decision tree first steps

2014-06-02 Thread Ludovic Courtès
Richard Biener skribis: > (match-and-simplify > (bit_and @0 integer_zerop@1) > @1) > (match-and-simplify > (bit_and @0 integer_all_onesp@1) > @0) > > is IMHO easier to parse while your version more like matches > what the code generator creates. Ah yes, the ability to specify predicates

Re: [GSoC] decision tree first steps

2014-06-02 Thread Richard Biener
On Mon, Jun 2, 2014 at 2:12 PM, Ludovic Courtès wrote: > Hi, > > Prathamesh Kulkarni skribis: > >> Example: >> /* x & 0 -> 0 */ >> (match_and_simplify >> (bit_and @0 @1) >> if (INTEGRAL_TYPE_P (TREE_TYPE (@0)) && (@1 == integer_zero_node)) >> { integer_zero_node; }) >> >> /* x & -1 -> x */

Re: [GSoC] decision tree first steps

2014-06-02 Thread Richard Biener
On Mon, Jun 2, 2014 at 1:16 PM, Prathamesh Kulkarni wrote: > I have few questions regarding genmatch: > > a) Why is 4 hard-coded here: ? > in write_nary_simplifiers: > fprintf (f, " tree captures[4] = {};\n"); Magic number (this must be big enough for all cases ...). Honestly this should b

Re: [GSoC] decision tree first steps

2014-06-02 Thread Ludovic Courtès
Hi, Prathamesh Kulkarni skribis: > Example: > /* x & 0 -> 0 */ > (match_and_simplify > (bit_and @0 @1) > if (INTEGRAL_TYPE_P (TREE_TYPE (@0)) && (@1 == integer_zero_node)) > { integer_zero_node; }) > > /* x & -1 -> x */ > (match_and_simplify > (bit_and @0 @1) > if (INTEGRAL_TYPE_P (TRE

[GSoC] decision tree first steps

2014-06-02 Thread Prathamesh Kulkarni
I have few questions regarding genmatch: a) Why is 4 hard-coded here: ? in write_nary_simplifiers: fprintf (f, " tree captures[4] = {};\n"); b) Should we add syntax for a symbol to denote multiple operators ? For exampleim in simplify_rotate: (X << CNT1) OP (X >> CNT2) with OP being +, |, ^