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: Cgraph Modification Plan


On Thu, Sep 6, 2012 at 12:47 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> What do you think of the following plan for turning cgraph into
>> a class hierarchy?  We cannot finish it until we have gengtype
>> understanding single inheritance, but we can start changing APIs
>> in preparation.
>
> Good you told me, I was about trying that myself. Did not know gengtype
> do not understand inheritance yet.
>>
>> APPROACH ###########################################
>>
>> Add converters and testers.
>> Change callers to use those.
>> Change callers to use type-safe parameters.
>> Change implementation to class hierarchy.
>> Add accessors.
>
> Sounds good to me.

Sorry to interrupt here, but please finish the existing partial C++ transitions
instead of starting to work on new ones.  Current stage1 will not last forever
(stage1 is usually 6 months, so its natural end would be end of September).
I'd rather have the current transition to a symbol table finished than having
that half-way done and half-way done in C++.  Please.

Btw, I also think the current symtab hierarchy is somewhat flawed.  At
the core a symtab entry should just be the symbol name and a list
of entities associated with it (much similar to the LTO symtab stuff).
Entities then are callgraph nodes, varpool nodes or alias nodes (or other
stuff).  Thus, the current symtab_node_base is too "fat", and decls,
instead of having DECL_ASSEMBLER_NAME should have a pointer
to the (new) symtab node they are associated with.

Thanks,
Richard.


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