This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [match-and-simplify] support operator list
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Prathamesh Kulkarni <bilbotheelffriend at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 4 Nov 2014 14:01:06 +0100
- Subject: Re: [match-and-simplify] support operator list
- Authentication-results: sourceware.org; auth=none
- References: <CAJXstsDUf6C93KQUyYsLKpd-qiZHy83FjEvsgFCmzjzuW1SGhw at mail dot gmail dot com> <20141103130117 dot GR5026 at tucnak dot redhat dot com> <CAFiYyc0X1ifhjc=5HO-z5=VCs_ZzdV9AUUGkbEj1s3ELkQeiWQ at mail dot gmail dot com> <20141103155041 dot GT5026 at tucnak dot redhat dot com>
On Mon, Nov 3, 2014 at 4:50 PM, Jakub Jelinek <jakub@redhat.com> 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 <jakub@redhat.com> 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_list eq_ops eq ne)
>> >> +(define_operator_list cc eq_ops lt le gt ge)
>> >
>> > I think cc is a bad name for the macro, that usually stands for condition
>> > code register.
>>
>> OTOH it is a perfect match for 'condition code'.
>
> So eqcodes and ccodes, or comp_code, ... ?
> Saving a few keystrokes there can be a problem for readability.
> Not to mention that there are various other tcc_comparison codes (lggt,
> unordered, ordered, un{lt,le,gt,ge,eq}).
Sure. Let's use ccodes then - or tcc_comparison (though I thought that
was quite long).
Well, the patch should be mostly about the new syntax of course.
Richard.
>
> Jakub