This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Move SSA macros and declarations out of tree.h
- From: Diego Novillo <dnovillo at google dot com>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Andrew Pinski <pinskia at gmail dot com>, Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Steven Bosscher <stevenb dot gcc at gmail dot com>, Ian Lance Taylor <iant at google dot com>, mradul at cse dot iitb dot ac dot in
- Date: Sat, 2 Oct 2010 14:08:20 -0400
- Subject: Re: Move SSA macros and declarations out of tree.h
- References: <AANLkTi=F96j=N=zsUOi_Vwzy2E507d5aQ7dTUm1629NP@mail.gmail.com> <AANLkTi=eLgQAV8bknQwKvEER_hF2wM6=zvyw2pS2hc2u@mail.gmail.com> <AANLkTinz7FFW=MXdwUkQopQP30vKut=j1rxK94xQc1+V@mail.gmail.com>
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.