This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [GSoC] TYPE stringfied in call to add_operator
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Prathamesh Kulkarni <bilbotheelffriend at gmail dot com>
- Cc: Diego Novillo <dnovillo at google dot com>,Maxim Kuvyrkov <maxim dot kuvyrkov at linaro dot org>,gcc <gcc at gcc dot gnu dot org>
- Date: Fri, 25 Apr 2014 19:43:32 +0200
- Subject: Re: [GSoC] TYPE stringfied in call to add_operator
- Authentication-results: sourceware.org; auth=none
- References: <CAJXstsDQScxnSc23KMse=JG1kd3U=ODs7yBoqP37STqLbMWPLQ at mail dot gmail dot com> <32a7ce69-9164-4109-b0a2-c24c1f660370 at email dot android dot com> <CAJXstsD0cL6fR9-diiTy4QyicYN6VuJAZJRrxExaQSqsn0-D+A at mail dot gmail dot com>
On April 25, 2014 6:56:00 PM CEST, Prathamesh Kulkarni <bilbotheelffriend@gmail.com> wrote:
>On Fri, Apr 25, 2014 at 10:12 PM, Richard Biener
><richard.guenther@gmail.com> wrote:
>> On April 25, 2014 4:54:28 PM CEST, Prathamesh Kulkarni
><bilbotheelffriend@gmail.com> wrote:
>>>Hi,
>>> I have a daft question to ask. I was looking through genmatch, I
>>>couldn't figure out why is tree code class (TYPE) stringified in call
>>>to add_operator () ?
>>>
>>>#define DEFTREECODE (SYM, STRING, TYPE, NARGS) \
>>> add_operator (SYM, #SYM, #TYPE, NARGS)
>>>
>>>In add_operator() tcc (argument corresponding to TYPE) is only used
>>>to check if the tree code belongs to one of (tcc_unary, tcc_binary,
>>>tcc_comparison, tcc_expression, tcc_reference) classes. Why can't we
>>>use enum tree_code_class for tcc ?
>>
>> Because there is no .def file for Tcc so we'd have to errors prone
>duplicate the enum.
>I was wondering why we couldn't include tree-core.h in genmatch ?
>Something similar to the attached patch. Shall that be incorrect ?
Sure, if it doesn't end up including target specifics on the host.
Richard.
>Thanks and Regards,
>Prathamesh
>>
>> Richard.
>>
>>>Thanks and Regards,
>>>Prathamesh
>>
>>