Re: [GSoC][match-and-simplify] include is-a.h

2014-07-30 Thread Richard Biener
On Tue, Jul 29, 2014 at 4:10 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Mon, Jul 28, 2014 at 7:30 PM, David Malcolm dmalc...@redhat.com wrote: On Mon, 2014-07-28 at 02:35 +0530, Prathamesh Kulkarni wrote: - if (o-type == operand::OP_CAPTURE) + if (is_acapture * (o))

Re: [GSoC][match-and-simplify] include is-a.h

2014-07-29 Thread Prathamesh Kulkarni
On Mon, Jul 28, 2014 at 7:30 PM, David Malcolm dmalc...@redhat.com wrote: On Mon, 2014-07-28 at 02:35 +0530, Prathamesh Kulkarni wrote: - if (o-type == operand::OP_CAPTURE) + if (is_acapture * (o)) { - capture *c = static_castcapture * (o); - fprintf (f, @%s,

Re: [GSoC][match-and-simplify] include is-a.h

2014-07-28 Thread Richard Biener
On Sun, Jul 27, 2014 at 11:05 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: Is it okay to include is-a.h ? I have adjusted print_operand to use is_a and as_a in this patch. * genmatch.c (is-a.h): Include. (is_a_helper::test): Specialize for operand subclasses.

Re: [GSoC][match-and-simplify] include is-a.h

2014-07-28 Thread David Malcolm
On Mon, 2014-07-28 at 02:35 +0530, Prathamesh Kulkarni wrote: - if (o-type == operand::OP_CAPTURE) + if (is_acapture * (o)) { - capture *c = static_castcapture * (o); - fprintf (f, @%s, (static_castcapture * (o))-where); + capture *c = as_acapture * (o); FWIW, if

[GSoC][match-and-simplify] include is-a.h

2014-07-27 Thread Prathamesh Kulkarni
Is it okay to include is-a.h ? I have adjusted print_operand to use is_a and as_a in this patch. * genmatch.c (is-a.h): Include. (is_a_helper::test): Specialize for operand subclasses. (print_operand): Adjust to use is_a and as_a. Thanks, Prathamesh. Index: genmatch.c