This is the mail archive of the gcc-patches@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: Move SSA macros and declarations out of tree.h


On 1 October 2010 11:51, Richard Guenther <richard.guenther@gmail.com> wrote:
>
> Hm, I don't see this as an improvement.
>
> SSA name is a tree. ?So it should be in tree.h. ?The only argument
> could be that ssa_use_operand_d belongs in tree-ssa-operands.h
> (but is not there because of cyclic dependencies I think).

SSA tree node is a derived type of tree type. Conceptually tree type
should not require SSA tree node to build. The current implementation
does not allow that, so I have to include tree-ssa-node.h in tree.h,
but it is conceivable that in the future this constraint will
disappear. I could put back tree-ssa-node.h into tree.h, but having it
in a separate file shows that they are two different things and it
indicates that tree.h is not the place to declare SSA stuff.

Moreover, this patch enables to use tree.h in the FE/plugins/external
applications without importing any SSA macros/functions. GCC wants
modularity or not?

Since there is no design or clearly defined library boundaries, the
best we can do is separate things into modular header files.

> Adding more headers isn't necessarily a good idea. ?Instead stripping
> tree.h to its core pieces (keep the tree stuff only) and moving function
> declarations to where they make more sense would be a better thing
> to do.

That is exactly what my patch does *except* that the current
implementation does not allow me to separate the SSA tree node types
declaration from tree.h. But the physical separation of
tree-ssa-node.h indicates that tree is the base type and tree_ssa_name
the derived type. Moreover, I thought it is a desired goal to split
the trees in the future, isn't it?

Moreover, people have problems finding the SSA interface in tree.h,
because logically it does not belong there, hence, tree-ssa.h should
be much easier to find.

Do you object to the whole patch, only to the tree-ssa-node.h file
separated from tree.h?

It is already very hard to contribute to GCC, could you please explain
how you envision a modular GCC?

Cheers,

Manuel.


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