This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gimple vs gimple_seq in 4.8 trunk
- From: Michael Matz <matz at suse dot de>
- To: Basile Starynkevitch <basile at starynkevitch dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 11 May 2012 14:12:32 +0200 (CEST)
- Subject: Re: gimple vs gimple_seq in 4.8 trunk
- References: <20120511114141.GA22746@ours.starynkevitch.net>
Hi,
On Fri, 11 May 2012, Basile Starynkevitch wrote:
> However, the type gimple_seq still appears in a lot of source files
> (mostly gcc/gimple*.c & gcc/tree*.c)
>
> Is this intended, or is this a temporary situation, and
> further patches would remove all occurrences of gimple_seq everywhere?
I'm personally undecided. Retaining gimple_seq would make it possible to
change the implementation of sequences to something else relatively
easily. Of course in the current situation uses of gimple where
gimple_seq should have been used will creep in silently into the compiler,
so that will become harder and harder over time anyway. But nevertheless
it would be nice to not make it harder than necessary.
> If it is intended, I would really like (probably in coretypes.h near the
> "typedef gimple gimple_seq;" line 75, or perhaps in gimple.h) a one
> paragraph comment explaning when a coder should write gimple_seq and
> when a coder should write just gimple.
gimple when you work with a specific statement (like looking at operands)
gimple_seq when you work with a linear collection of thingies that happen
to be statements (like appending a just created new statement)
But yes, a comment would probably help.
Ciao,
Michael.