This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 0/3] Compile-time gimple checking, without typedefs
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: David Malcolm <dmalcolm at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Sandiford <rdsandiford at googlemail dot com>, Andrew MacLeod <amacleod at redhat dot com>
- Date: Mon, 5 May 2014 19:37:52 +0200
- Subject: Re: [PATCH 0/3] Compile-time gimple checking, without typedefs
- Authentication-results: sourceware.org; auth=none
- References: <66f4112c-2a2f-4d2b-8f8e-d2011a7982f7 at email dot android dot com> <1399067771-11711-1-git-send-email-dmalcolm at redhat dot com> <CAFiYyc3D9XujxhxZnXYLtMCm2KejoLtKpRagg+hGoGfK0j5sVQ at mail dot gmail dot com> <5367B5E6 dot 7020209 at redhat dot com>
On Mon, May 5, 2014 at 6:01 PM, Jeff Law <email@example.com> wrote:
> On 05/05/14 02:22, Richard Biener wrote:
>>> Also, AIUI, Andrew is looking at introducing concepts of gimple types and
>>> gimple expressions, so "gimple" may no longer imply a *statement*.
>>> Alternatively, we could make the base class be just "gimple" (which would
>>> be more consistent with the names of the accessor functions).
>> I strongly prefer to name it 'gimple', not 'gimple_stmt'. Because it's
>> to type, and because it will make all other types shorter as well. And
>> 'gimple' _is_ a stmt right now, so gimple_stmt is redundant. Same applies
>> to gimple_stmt_with_FOO, just make it gimple_with_FOO.
>> I understand the namespace issue, but we don't have a namespace right now.
>> Also gimple::gimple works just fine, no?
> But this approach is going to be inconsistent with Andrew's work, right?
> ISTM we'd end up with something like...
> So statements would be "gimple"
> types would be "gimple_type"
> expressions would be "gimple_expr"
Well, I hope that Andrew doesn't do without a namespace (and I still
don't believe in what he tries to achieve without laying proper ground-work
throughout the compiler). With a namespace gimple we can use
> It's a bit of bikeshedding, but I'd prefer "gimple_stmt". If you really
> feel strongly about it, I'll go along without objection, but it seems wrong
> to me.
Less typing. But yes, it's bikeshedding. Still gimple_stmt is
redundant information in almost all context. 'stmt' was opposed to
elsewhere so we settle on 'gimple' (which is already existing).
IMHO not changing things is the best bikeshedding argument.
>>> There's also the "bargain basement" namespaces approach, where we don't
>>> have an implicit "gimple" namespace, but just *pretend* we do, and rename
>>> the base type to "stmt", with e.g. "gimple_statement_phi" becoming just
>>> "phi". ["gimple_switch" would need to become "switch_", say, to avoid the
>>> reserved word].
>> Ick (for the 'switch' case ... CamelCase anyone? :)).
> :-) Please, no....
Agreed on that, btw. But switch_ can't be the answer either. Maybe
swidch (similar do klass) or swjdch. Or swtch. I like swtch the best
(similar to stmt).