This is the mail archive of the
mailing list for the GCC project.
Re: [gsoc 2014] moving fold-const patterns to gimple
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Prathamesh Kulkarni <bilbotheelffriend at gmail dot com>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Wed, 19 Mar 2014 10:43:55 +0100
- Subject: Re: [gsoc 2014] moving fold-const patterns to gimple
- Authentication-results: sourceware.org; auth=none
- References: <CAJXstsDSbO7QTSkJ-y4ftO4SshGkwYuow+U0nb4FdHSjHtfB=A at mail dot gmail dot com> <CAFiYyc0UqPLoV76gUWiUXzCa3SxumXrmq7vsFtJ4GtnNjVrf3A at mail dot gmail dot com> <CAJXstsAAA0=2ELCaai8SdM3e3S1S2hcigUF2A=s0jS-ytwCXdA at mail dot gmail dot com> <CAFiYyc09sUOGGaPzRge6ysr1TzucGCMufFSQbTy5GADXWh5rTg at mail dot gmail dot com> <CAJXstsAuf8PSvbFMudDV43xdJTQ5wxYoiRGO5MJ-u0QCZYVunw at mail dot gmail dot com> <CAFiYyc0k=onaLtokpzsbbHDQ7SvotYdpkuF5z+UyVwC2JhkFnA at mail dot gmail dot com> <CAJXstsCD1EEMKqB19-=7SOrsmQgNFn23+mUe0+S-bPULHLgbXg at mail dot gmail dot com> <CAFiYyc2W7nmYnpBFF-xhO3G4rGzVLXvZoCaRV6UTo_2aZNxuxA at mail dot gmail dot com> <CAFiYyc2WRuH7Am42zBQd2-h6tatsgX8Wn9ECb_b_QNq0FYTA1g at mail dot gmail dot com> <CAJXstsC86wTB6oWdaCqtcR6vP4k4OJu0eAsoTLxsp_iXz48hvg at mail dot gmail dot com> <CAFiYyc0xD8X9bwrg1iAziqZO-BOZ1vYkW+fm+8i75eUp_-pCyQ at mail dot gmail dot com> <CAJXstsDnSn54JNVaN3ZY8b4LnfjgYJ=0p_+M+_GnYVTF3-NMrA at mail dot gmail dot com> <CAFiYyc2dwsfrS=69bNw0JGBeJY4krM--Q0FUMmkup2pVvJ2YMA at mail dot gmail dot com> <CAJXstsD0Y=vBxw9QveOU3O3jhQgbYkxj_iyfje=AFypHEmK9gA at mail dot gmail dot com>
On Tue, Mar 18, 2014 at 9:04 AM, Prathamesh Kulkarni
> On Mon, Mar 17, 2014 at 2:22 PM, Richard Biener
> <firstname.lastname@example.org> wrote:
>> On Sun, Mar 16, 2014 at 1:21 PM, Prathamesh Kulkarni
>> <email@example.com> wrote:
>>> In c_expr::c_expr, shouldn't OP_C_EXPR be passed to operand
>>> constructor instead of OP_EXPR ?
>> Indeed - I have committed the fix.
> Hi, I have attached an initial draft of my proposal.
> I would be grateful to receive your feedback.
Ok, I had a look at the proposal and it is mostly fine. I'd be more specific
on the deliverables, specifically
1) genmatch - program to read meta description and generate code to
simplify GENERIC and GIMPLE according to the pattern descriptions
using an algorithm not linear in the number of patterns
2) add patterns matched by tree-ssa-forwprop.c (and thus patterns
in fold-const.c it depends on) to the meta-description and perform
the simplifications of tree-ssa-forwprop.c in terms of the simplification API
You will figure out that there are possibly a lot of patterns in fold-const.c
that forwprop depends on (I know mainly of all the comparison simplifications).
For the Timeline I'd move e) as a sub-task of f) to June 28 - July 16,
eventually just dividing the weeks of July 17 - August 11 to that and
the following task.
That is, the overall deliverable should be a tree-ssa-forwprop.c that is
(mostly) implemented in terms of patterns, ready for commit to trunk
As for targeting GENERIC, useful testing coverage of that path will
come from for example re-writing fold-const.c:fold_comparison using
the GENERIC API of the pattern simplifier.
The devil will be in the details (as always) ;)
As Maxim said - make sure to register your proposal in-time, you
can always improve on it later.
> Thanks and Regards,
>>> This caused segfault for patterns when "simplification" operand was
>>> only c_expr (patch attached).
>>> * genmatch.c (c_expr::c_expr): use OP_C_EXPR instead of OP_EXPR in
>>> call to operand constructor.