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 bilbotheelffri...@gmail.com wrote: On Wed, Mar 19, 2014 at 3:13 PM, Richard Biener richard.guent...@gmail.com wrote: On Tue, Mar 18, 2014 at 9:04 AM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Mon, Mar 17, 2014 at 2:22 PM,

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 bilbotheelffri...@gmail.com wrote: On Mon, Mar 17, 2014 at 2:22 PM, Richard Biener richard.guent...@gmail.com wrote: On Sun, Mar 16, 2014 at 1:21 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: In c_expr::c_expr, shouldn't

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 richard.guent...@gmail.com wrote: On Sun, Mar 16, 2014 at 1:21 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com 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

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 bilbotheelffri...@gmail.com wrote: On Mon, Mar 17, 2014 at 2:22 PM, Richard Biener richard.guent...@gmail.com wrote: On Sun, Mar 16, 2014 at 1:21 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: In c_expr::c_expr, shouldn't

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 bilbotheelffri...@gmail.com 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

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 richard.guent...@gmail.com wrote: On Fri, Mar 14, 2014 at 4:31 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Thu, Mar 13, 2014 at 4:44 PM, Richard Biener richard.guent...@gmail.com wrote: On Tue, Mar 11, 2014 at 12:20 PM,

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 richard.guent...@gmail.com wrote: On Tue, Mar 11, 2014 at 12:20 PM, Richard Biener richard.guent...@gmail.com wrote: On Mon, Mar 10, 2014 at 7:29 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: Hi Richard, Sorry for the late reply. I

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 bilbotheelffri...@gmail.com wrote: On Thu, Mar 13, 2014 at 4:44 PM, Richard Biener richard.guent...@gmail.com wrote: On Tue, Mar 11, 2014 at 12:20 PM, Richard Biener richard.guent...@gmail.com wrote: On Mon, Mar 10, 2014 at 7:29 PM,

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

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 marc.gli...@inria.fr 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

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 bilbotheelffri...@gmail.com wrote: On Thu, Mar 13, 2014 at 4:44 PM, Richard Biener richard.guent...@gmail.com wrote: On Tue, Mar 11, 2014 at 12:20 PM, Richard Biener richard.guent...@gmail.com wrote: On Mon, Mar 10, 2014 at 7:29 PM,

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 marc.gli...@inria.fr 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

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 richard.guent...@gmail.com wrote: On Mon, Mar 10, 2014 at 7:29 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: Hi Richard, Sorry for the late reply. I would like to have few clarifications regarding the following points: a) Pattern

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 bilbotheelffri...@gmail.com 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

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 richard.guent...@gmail.com wrote: On Thu, Mar 6, 2014 at 7:17 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Thu, Mar 6, 2014 at 6:13 PM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Mar 6, 2014 at 1:11 PM, Prathamesh

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 bilbotheelffri...@gmail.com wrote: On Thu, Mar 6, 2014 at 6:13 PM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Mar 6, 2014 at 1:11 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Mon, Mar 3, 2014 at 3:32 PM,

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 richard.guent...@gmail.com wrote: On Sun, Mar 2, 2014 at 9:13 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: Hi, I am an undergraduate student at University of Pune, India, and would like to work on moving folding patterns from

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 richard.guent...@gmail.com wrote: On Thu, Mar 6, 2014 at 1:11 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Mon, Mar 3, 2014 at 3:32 PM, Richard Biener richard.guent...@gmail.com wrote: On Sun, Mar 2, 2014 at 9:13 PM, Prathamesh

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 bilbotheelffri...@gmail.com 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

[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