Re: [match-and-simplify] support operator list

2014-11-04 Thread Richard Biener
On Mon, Nov 3, 2014 at 1:56 PM, Prathamesh Kulkarni wrote: > (had sent it earlier by private mail). > > The attached patch supports operator-list and it's use in for. > For now, operator-list is rejected in expression. Ok. > This patch also allows user-defined operator to be used as operator-lis

Re: [match-and-simplify] support operator list

2014-11-04 Thread Richard Biener
On Mon, Nov 3, 2014 at 4:50 PM, Jakub Jelinek wrote: > On Mon, Nov 03, 2014 at 04:46:43PM +0100, Richard Biener wrote: >> On Mon, Nov 3, 2014 at 2:01 PM, Jakub Jelinek wrote: >> > On Mon, Nov 03, 2014 at 06:26:12PM +0530, Prathamesh Kulkarni wrote: >> >> --- gcc/match-comparison.pd (revision 21

Re: [match-and-simplify] support operator list

2014-11-03 Thread Jakub Jelinek
On Mon, Nov 03, 2014 at 04:46:43PM +0100, Richard Biener wrote: > On Mon, Nov 3, 2014 at 2:01 PM, Jakub Jelinek wrote: > > On Mon, Nov 03, 2014 at 06:26:12PM +0530, Prathamesh Kulkarni wrote: > >> --- gcc/match-comparison.pd (revision 216916) > >> +++ gcc/match-comparison.pd (working copy) > >

Re: [match-and-simplify] support operator list

2014-11-03 Thread Richard Biener
On Mon, Nov 3, 2014 at 2:01 PM, Jakub Jelinek wrote: > On Mon, Nov 03, 2014 at 06:26:12PM +0530, Prathamesh Kulkarni wrote: >> --- gcc/match-comparison.pd (revision 216916) >> +++ gcc/match-comparison.pd (working copy) >> @@ -1,5 +1,8 @@ >> /* From fold_binary. */ >> >> +(define_operator_lis

Re: [match-and-simplify] support operator list

2014-11-03 Thread Jakub Jelinek
On Mon, Nov 03, 2014 at 06:26:12PM +0530, Prathamesh Kulkarni wrote: > --- gcc/match-comparison.pd (revision 216916) > +++ gcc/match-comparison.pd (working copy) > @@ -1,5 +1,8 @@ > /* From fold_binary. */ > > +(define_operator_list eq_ops eq ne) > +(define_operator_list cc eq_ops lt le gt

[match-and-simplify] support operator list

2014-11-03 Thread Prathamesh Kulkarni
(had sent it earlier by private mail). The attached patch supports operator-list and it's use in for. For now, operator-list is rejected in expression. This patch also allows user-defined operator to be used as operator-list (user-defined ops are really temporary or "scoped" operator-lists). (for

Re: support operator list

2014-10-28 Thread Richard Biener
On Sun, Oct 26, 2014 at 7:40 AM, Prathamesh Kulkarni wrote: > Fixed a silly mistake in match-bitwise.pd (I had put ')' at wrong place). > This patch also checks if operator-list is used outside for-pattern > (in parser::parse_operation). With recent discussion on how to use operator-lists - thus

Re: support operator list

2014-10-25 Thread Prathamesh Kulkarni
Fixed a silly mistake in match-bitwise.pd (I had put ')' at wrong place). This patch also checks if operator-list is used outside for-pattern (in parser::parse_operation). * genmatch.c (user_id): Add new member is_oper_list. (user_id::user_id): Add new default argument. (parser::parse_

support operator list

2014-10-25 Thread Prathamesh Kulkarni
Hi, This patch adds support for operator-lists, and uses them in match-bitwise.pd and match-comparison.pd * genmatch.c (parser::parse_operator_list): New member function in parser. (add_substitute): New function. (flatten_substitutes): Likewise. (parser::parse_for): Call add_su