This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 03/89] Introduce gimple_bind and use it for accessors.

On Wed, Apr 23, 2014 at 11:23 PM, Jeff Law <> 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
>>>> a
>>>> 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
>>>> from
>>>> 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'
type anyway].

So I'd rather not say "ok for trunk after 4.9.1" for the current form
with the cast changes.  Not yet.


> jeff

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]