This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 03/89] Introduce gimple_bind and use it for accessors.
- 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>
- Date: Thu, 24 Apr 2014 10:33:25 +0200
- Subject: Re: [PATCH 03/89] Introduce gimple_bind and use it for accessors.
- Authentication-results: sourceware.org; auth=none
- References: <1398099480-49147-1-git-send-email-dmalcolm at redhat dot com> <1398099480-49147-4-git-send-email-dmalcolm at redhat dot com> <53582AF1 dot 7010201 at redhat dot com> <1398287639 dot 26834 dot 142 dot camel at surprise> <53582F37 dot 1040202 at redhat dot com>
On Wed, Apr 23, 2014 at 11:23 PM, Jeff Law <firstname.lastname@example.org> wrote:
> On 04/23/14 15:13, David Malcolm wrote:
>> On Wed, 2014-04-23 at 15:04 -0600, Jeff Law wrote:
>>> On 04/21/14 10:56, David Malcolm wrote:
>>>> This updates all of the gimple_bind_* accessors in gimple.h from taking
>>>> plain gimple to taking a gimple_bind (or const_gimple_bind), with the
>>>> checking happening at the point of cast.
>>>> Various other types are strengthened from gimple to gimple_bind, and
>>>> plain vec<gimple> to vec<gimple_bind>.
>>> This is fine, with the same requested changes as #2; specifically using
>>> an explicit cast rather than hiding the conversion in a method. Once
>>> those changes are in place, it's good for 4.9.1.
>> Thanks - presumably you mean
>> "good for *trunk* after 4.9.1 is released"
> Right. Sorry for the confusion.
Note I still want that less-typedefs (esp. the const_*) variants to be explored.
Changing this will touch all the code again, so I'd like to avoid that.
That is, shouldn't we go back to 'gimple' being 'gimple_statement_base'
and not 'gimple_statement_base *'? The main reason that we have so
many typedefs is that in C you had to use 'struct foo' each time you
refer to foo as a type - I suppose it was then convenient to do the
typedef to the pointer type. With 'gimple' being not a pointer type
we get const correctness in the way people would expect it to work.
[no, I don't suggest you change 'tree' or 'const_tree' at this point, just
gimple (and maybe gimple_seq) as you are working on the 'gimple'
So I'd rather not say "ok for trunk after 4.9.1" for the current form
with the cast changes. Not yet.