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 Fri, Oct 1, 2010 at 05:51, Richard Guenther
<richard.guenther@gmail.com> wrote:

> Thus, I object to the patch.

I agree with Richard here.  This separation does not seem useful.  I
would keep all the tree data structure definitions in tree.h.  I have
been thinking about stripping appart tree.h in these ways.  I haven't
really spent a long time analyzing whether this separation makes
perfect sense, however:

- Keep all the tree data structures in tree.h.

- Make tree an opaque void * pointer to prevent users accessing
internal fields directly.  This is already used in libcpp.

- Convert macro accessors to inline functions and move them into a
separate header.  I expect some pushback on this idea, but it really
simplifies debugging, increases encapsulation and allows us to expose
a clearer API by exporting all the interfaces through which trees can
be manipulated.

- Move function declarations to other .h files (e.g., all the folding
prototypes, dwarf2 prototypes, etc).


Thoughts?


Diego.


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