This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [match-and-simplify] CSE with expression captures
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Prathamesh Kulkarni <bilbotheelffriend at gmail dot com>
- Cc: Marc Glisse <marc dot glisse at inria dot fr>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 16 Sep 2014 11:42:16 +0200
- Subject: Re: [match-and-simplify] CSE with expression captures
- Authentication-results: sourceware.org; auth=none
- References: <CAJXstsB2XLnE4hp8h12uK_M4UmyZTLd14HYfrM0_yY+Mrf-aEw at mail dot gmail dot com> <alpine dot DEB dot 2 dot 11 dot 1409152240140 dot 1630 at laptop-mg dot saclay dot inria dot fr> <CAJXstsCdy0UMLqmXC373=VJtxJZdPqsXYCnk-OGe7_aqcEfFJA at mail dot gmail dot com>
On Tue, Sep 16, 2014 at 8:25 AM, Prathamesh Kulkarni
<bilbotheelffriend@gmail.com> wrote:
> On Tue, Sep 16, 2014 at 2:15 AM, Marc Glisse <marc.glisse@inria.fr> wrote:
>> On Tue, 16 Sep 2014, Prathamesh Kulkarni wrote:
>>
>>> --- gcc/match-builtin.pd (revision 215271)
>>> +++ gcc/match-builtin.pd (working copy)
>>> @@ -44,8 +44,8 @@
>>> /* ??? There is no way to CSE here. We'd need to support
>>> expression captures here, like with
>>> (mult (realpart@1 @0) @1) */
>>> - (mult (realpart @0) (realpart @0))
>>> - (mult (imagpart @0) (imagpart @0)))))))
>>> + (mult (realpart@1 @0) @1) + (mult (imagpart@2 @0) @2))))))
>>
>>
>> Maybe remove the comment above?
>>
>> You seem to have trailing spaces on most of your new lines.
> Thanks, fixed.
>
> * genmatch.c (operand::gen_transform): Add dt_operand ** default argument
> to operand heirarchy.
> (expr::gen_transform): Adjust.
> (capture::gen_transform): Likewise.
> (dt_simplify::gen): Likewise.
>
> * match-builtins.pd: Adjust pattern to use expression captures in
> transform.
Heh, that was simpler than I thought ;)
Thanks, applied.
Richard.
> Regards,
> Prathamesh
>>
>> --
>> Marc Glisse