This is the mail archive of the
mailing list for the GCC project.
Re: [GSoC] writing test-case
- From: Michael Matz <matz at suse dot de>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Prathamesh Kulkarni <bilbotheelffriend at gmail dot com>, Andreas Schwab <schwab at linux-m68k dot org>, Diego Novillo <dnovillo at google dot com>, gcc <gcc at gcc dot gnu dot org>, Maxim Kuvyrkov <maxim dot kuvyrkov at linaro dot org>
- Date: Mon, 19 May 2014 17:51:37 +0200 (CEST)
- Subject: Re: [GSoC] writing test-case
- Authentication-results: sourceware.org; auth=none
- References: <CAJXstsAsui9S5q2Q0VxUjnrtgvbgd+W_cxcZqXG-p5dEqpNnEQ at mail dot gmail dot com> <878uq8idjw dot fsf at igel dot home> <CAJXstsCeKwRe7eQRiwyoDKr9h7KVy7MfMLmjOne2WBH6iqcMJg at mail dot gmail dot com> <CAFiYyc1KZaBcPzRifDtsQb0_wDPx_8qBbnR5C8ByVfPucyryoQ at mail dot gmail dot com> <CAJXstsCBduFryPA-xe8mwM_q2keNX9B4XtXLSkFNKmL=rWRoFQ at mail dot gmail dot com> <CAFiYyc3R+OAyeEZYpY1ekv=gN0CbLp9XaYJ+WZtpLzavKmzKDQ at mail dot gmail dot com> <CAFiYyc1O_CQXegp1b03LHungMpv_tSnAj1EEwuQ6DCXRPyoP7w at mail dot gmail dot com> <CAFiYyc0SAicvNNaBb1Gt0n=pFW1Hgr-BT3vuw9GYOcr8C716bg at mail dot gmail dot com> <CAJXstsBi_Fb5cWf5nNGkJoN4xjycDp_oc3C7Fdhs2jA6ffK=sQ at mail dot gmail dot com> <CAFiYyc2+n73QNhGL0+KwFK9pCOGz-F=x88c+5Dgp5zZWdO0dWw at mail dot gmail dot com>
On Thu, 15 May 2014, Richard Biener wrote:
> To me predicate (and capture without expression or predicate)
> differs from expression in that predicate is clearly a leaf of the
> expression tree while we have to recurse into expression operands.
> Now, if we want to support applying predicates to the midst of an
> expression, like
> (plus predicate(minus @0 @1)
> then this would no longer be true. At the moment you'd write
> (plus (minus@3 @0 @1)
> if (predicate (@3))
> which makes it clearer IMHO (with the decision tree building
> you'd apply the predicates after matching the expression tree
> anyway I suppose, so code generation would be equivalent).
Syntaxwise I had this idea for adding generic predicates to expressions:
(plus (minus @0 @1):predicate
If prefix or suffix doesn't matter much, but using a different syntax
to separate expression from predicate seems to make things clearer.
Optionally adding things like and/or for predicates might also make sense:
(plus (minus @0 @1):positive_p(@0) || positive_p(@1)