This is the mail archive of the gcc@gcc.gnu.org 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: gimple vs gimple_seq in 4.8 trunk


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.


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