[match-and-simplify] support operator list
Prathamesh Kulkarni
bilbotheelffriend@gmail.com
Mon Nov 3 12:56:00 GMT 2014
(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 op (plus minus)
op2 (op...)
(simplify
...))
Should that be supported or rejected ?
* genmatch.c
(user_id): Add new member is_oper_list.
(user_id::user_id): Add new default argument.
(parser::parse_operator_list): New function.
(parser::parse_for): Allow operator-list.
(parser::parse_pattern): Call parser::parse_operator_list.
(parser::parse_operation): Reject operator-list.
* match-comparison.pd
Define operator-lists eq_ops and cc and use them in patterns.
Thanks,
Prathamesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: olist.patch
Type: text/x-patch
Size: 5425 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141103/2fe1a5c8/attachment.bin>
More information about the Gcc-patches
mailing list