Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-21 Thread Richard Biener
On Thu, Mar 20, 2014 at 9:52 PM, Prathamesh Kulkarni wrote: > On Wed, Mar 19, 2014 at 3:13 PM, Richard Biener > wrote: >> On Tue, Mar 18, 2014 at 9:04 AM, Prathamesh Kulkarni >> wrote: >>> On Mon, Mar 17, 2014 at 2:22 PM, Richard Biener >>> wrote: On Sun, Mar 16, 2014 at 1:21 PM, Prathames

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-20 Thread Prathamesh Kulkarni
On Wed, Mar 19, 2014 at 3:13 PM, Richard Biener wrote: > On Tue, Mar 18, 2014 at 9:04 AM, Prathamesh Kulkarni > wrote: >> On Mon, Mar 17, 2014 at 2:22 PM, Richard Biener >> wrote: >>> On Sun, Mar 16, 2014 at 1:21 PM, Prathamesh Kulkarni >>> wrote: In c_expr::c_expr, shouldn't OP_C_EXPR be

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-19 Thread Richard Biener
On Tue, Mar 18, 2014 at 9:04 AM, Prathamesh Kulkarni wrote: > On Mon, Mar 17, 2014 at 2:22 PM, Richard Biener > wrote: >> On Sun, Mar 16, 2014 at 1:21 PM, Prathamesh Kulkarni >> wrote: >>> In c_expr::c_expr, shouldn't OP_C_EXPR be passed to operand >>> constructor instead of OP_EXPR ? >> >> Inde

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-18 Thread Maxim Kuvyrkov
On Mar 18, 2014, at 9:13 PM, Prathamesh Kulkarni wrote: > On Mon, Mar 17, 2014 at 2:22 PM, Richard Biener > wrote: >> On Sun, Mar 16, 2014 at 1:21 PM, Prathamesh Kulkarni >> wrote: >>> In c_expr::c_expr, shouldn't OP_C_EXPR be passed to operand >>> constructor instead of OP_EXPR ? >> >> Indee

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-18 Thread Prathamesh Kulkarni
On Mon, Mar 17, 2014 at 2:22 PM, Richard Biener wrote: > On Sun, Mar 16, 2014 at 1:21 PM, Prathamesh Kulkarni > wrote: >> In c_expr::c_expr, shouldn't OP_C_EXPR be passed to operand >> constructor instead of OP_EXPR ? > > Indeed - I have committed the fix. > My earlier mail got rejected (maybe be

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-17 Thread Richard Biener
On Sun, Mar 16, 2014 at 1:21 PM, Prathamesh Kulkarni wrote: > In c_expr::c_expr, shouldn't OP_C_EXPR be passed to operand > constructor instead of OP_EXPR ? Indeed - I have committed the fix. Thanks, Richard. > This caused segfault for patterns when "simplification" operand was > only c_expr (p

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-16 Thread Prathamesh Kulkarni
On Fri, Mar 14, 2014 at 10:46 PM, Richard Biener wrote: > On Fri, Mar 14, 2014 at 4:31 PM, Prathamesh Kulkarni > wrote: >> On Thu, Mar 13, 2014 at 4:44 PM, Richard Biener >> wrote: >>> On Tue, Mar 11, 2014 at 12:20 PM, Richard Biener >>> wrote: On Mon, Mar 10, 2014 at 7:29 PM, Prathamesh K

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-14 Thread Marc Glisse
On Fri, 14 Mar 2014, Prathamesh Kulkarni wrote: On Fri, Mar 14, 2014 at 9:25 PM, Marc Glisse wrote: On Fri, 14 Mar 2014, Prathamesh Kulkarni wrote: The patterns mentioned in the links were: a) (X >> CST1) >= CST2 -> X >= CST2 << CST1 however, an expression Y >= CST gets folded to Y > CST - 1

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-14 Thread Richard Biener
On Fri, Mar 14, 2014 at 4:31 PM, Prathamesh Kulkarni wrote: > On Thu, Mar 13, 2014 at 4:44 PM, Richard Biener > wrote: >> On Tue, Mar 11, 2014 at 12:20 PM, Richard Biener >> wrote: >>> On Mon, Mar 10, 2014 at 7:29 PM, Prathamesh Kulkarni >>> wrote: Hi Richard, Sorry for the late reply

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-14 Thread Prathamesh Kulkarni
On Fri, Mar 14, 2014 at 9:25 PM, Marc Glisse wrote: > On Fri, 14 Mar 2014, Prathamesh Kulkarni wrote: > >> I had a look at PR 14753 >> (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14753) from the first >> link. I have tried to implement those transforms (attached patch, >> stage-1 compiled). >> I

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-14 Thread Marc Glisse
On Fri, 14 Mar 2014, Prathamesh Kulkarni wrote: I had a look at PR 14753 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14753) from the first link. I have tried to implement those transforms (attached patch, stage-1 compiled). I have written the transforms to operate on GENERIC. Why not directly

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-14 Thread Prathamesh Kulkarni
On Fri, Mar 14, 2014 at 9:01 PM, Prathamesh Kulkarni wrote: > On Thu, Mar 13, 2014 at 4:44 PM, Richard Biener > wrote: >> On Tue, Mar 11, 2014 at 12:20 PM, Richard Biener >> wrote: >>> On Mon, Mar 10, 2014 at 7:29 PM, Prathamesh Kulkarni >>> wrote: Hi Richard, Sorry for the late reply

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-14 Thread Prathamesh Kulkarni
On Thu, Mar 13, 2014 at 4:44 PM, Richard Biener wrote: > On Tue, Mar 11, 2014 at 12:20 PM, Richard Biener > wrote: >> On Mon, Mar 10, 2014 at 7:29 PM, Prathamesh Kulkarni >> wrote: >>> Hi Richard, >>> Sorry for the late reply. I would like to have few clarifications >>> regarding the following p

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-13 Thread Richard Biener
On Tue, Mar 11, 2014 at 12:20 PM, Richard Biener wrote: > On Mon, Mar 10, 2014 at 7:29 PM, Prathamesh Kulkarni > wrote: >> Hi Richard, >> Sorry for the late reply. I would like to have few clarifications >> regarding the following points: >> >> a) Pattern matching: Currently, gimple_match_and_sim

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-11 Thread Richard Biener
On Mon, Mar 10, 2014 at 7:29 PM, Prathamesh Kulkarni wrote: > Hi Richard, > Sorry for the late reply. I would like to have few clarifications > regarding the following points: > > a) Pattern matching: Currently, gimple_match_and_simplify() matches > patterns one-by-one. Could we use a decision tre

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-10 Thread Prathamesh Kulkarni
On Fri, Mar 7, 2014 at 2:38 PM, Richard Biener wrote: > On Thu, Mar 6, 2014 at 7:17 PM, Prathamesh Kulkarni > wrote: >> On Thu, Mar 6, 2014 at 6:13 PM, Richard Biener >> wrote: >>> On Thu, Mar 6, 2014 at 1:11 PM, Prathamesh Kulkarni >>> wrote: On Mon, Mar 3, 2014 at 3:32 PM, Richard Biener

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-07 Thread Richard Biener
On Thu, Mar 6, 2014 at 7:17 PM, Prathamesh Kulkarni wrote: > On Thu, Mar 6, 2014 at 6:13 PM, Richard Biener > wrote: >> On Thu, Mar 6, 2014 at 1:11 PM, Prathamesh Kulkarni >> wrote: >>> On Mon, Mar 3, 2014 at 3:32 PM, Richard Biener >>> wrote: On Sun, Mar 2, 2014 at 9:13 PM, Prathamesh Kul

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-06 Thread Prathamesh Kulkarni
On Thu, Mar 6, 2014 at 6:13 PM, Richard Biener wrote: > On Thu, Mar 6, 2014 at 1:11 PM, Prathamesh Kulkarni > wrote: >> On Mon, Mar 3, 2014 at 3:32 PM, Richard Biener >> wrote: >>> On Sun, Mar 2, 2014 at 9:13 PM, Prathamesh Kulkarni >>> wrote: Hi, I am an undergraduate student at Universit

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-06 Thread Prathamesh Kulkarni
On Mon, Mar 3, 2014 at 3:32 PM, Richard Biener wrote: > On Sun, Mar 2, 2014 at 9:13 PM, Prathamesh Kulkarni > wrote: >> Hi, I am an undergraduate student at University of Pune, India, and would >> like to work on moving folding patterns from fold-const.c to gimple. > > I've seen the entry on our

Re: [gsoc 2014] moving fold-const patterns to gimple

2014-03-03 Thread Richard Biener
On Sun, Mar 2, 2014 at 9:13 PM, Prathamesh Kulkarni wrote: > Hi, I am an undergraduate student at University of Pune, India, and would > like to work on moving folding patterns from fold-const.c to gimple. I've seen the entry on our GSoC project page and edited it to discourage people from workin

[gsoc 2014] moving fold-const patterns to gimple

2014-03-02 Thread Prathamesh Kulkarni
Hi, I am an undergraduate student at University of Pune, India, and would like to work on moving folding patterns from fold-const.c to gimple. If I understand correctly, constant folding is done on GENERIC (by routines in fold-const.c), and then GENERIC is lowered to GIMPLE. The purpose of this pr