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 OP_C_EXPR be passed to operand >>> constructor instead of OP_EXPR ? >> >> Indeed - I have committed the fix. >> > Hi, I have attached an initial draft of my proposal. > I would be grateful to receive your feedback.
Ok, I had a look at the proposal and it is mostly fine. I'd be more specific on the deliverables, specifically 1) genmatch - program to read meta description and generate code to simplify GENERIC and GIMPLE according to the pattern descriptions using an algorithm not linear in the number of patterns 2) add patterns matched by tree-ssa-forwprop.c (and thus patterns in fold-const.c it depends on) to the meta-description and perform the simplifications of tree-ssa-forwprop.c in terms of the simplification API You will figure out that there are possibly a lot of patterns in fold-const.c that forwprop depends on (I know mainly of all the comparison simplifications). For the Timeline I'd move e) as a sub-task of f) to June 28 - July 16, eventually just dividing the weeks of July 17 - August 11 to that and the following task. That is, the overall deliverable should be a tree-ssa-forwprop.c that is (mostly) implemented in terms of patterns, ready for commit to trunk during stage1. As for targeting GENERIC, useful testing coverage of that path will come from for example re-writing fold-const.c:fold_comparison using the GENERIC API of the pattern simplifier. The devil will be in the details (as always) ;) As Maxim said - make sure to register your proposal in-time, you can always improve on it later. Thanks, Richard. > Thanks and Regards, > Prathamesh >> Thanks, >> Richard. >> >>> This caused segfault for patterns when "simplification" operand was >>> only c_expr (patch attached). >>> >>> * genmatch.c (c_expr::c_expr): use OP_C_EXPR instead of OP_EXPR in >>> call to operand constructor.