This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 0/3] Compile-time gimple checking, without typedefs
- From: Jeff Law <law at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, David Malcolm <dmalcolm at redhat dot com>
- Cc: 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, 05 May 2014 10:01:42 -0600
- 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>
On 05/05/14 02:22, Richard Biener wrote:
But this approach is going to be inconsistent with Andrew's work, right?
ISTM we'd end up with something like...
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 less
to type, and because it will make all other types shorter as well. And because
'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?
So statements would be "gimple"
types would be "gimple_type"
expressions would be "gimple_expr"
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.
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
Ick (for the 'switch' case ... CamelCase anyone? :)).
:-) Please, no....