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: Patch: darwin specific


On Monday, November 25, 2002, at 02:17  PM, Zack Weinberg wrote:
The ID's don't have to be trees as long as there's a place for the
pointers, and in fact the pointer space is not needed in most IDs
and can be lazily allocated, although it isn't now.  I believe Per
is thinking along the lines of having a target-specific area pointed
to from the ID nodes.
A generic target-specific data area for identifiers sounds good, but
is there any other target that could actually use this?  That's not a
rhetorical question, I don't know what-all kluges are hiding in arch.c
files that might be helped by this.
I don't know either.

However, your own comment says

+ /* These pointers are referenced in this file only.  It would be
+    nice to put them somewhere else in the data structures; they
+    really belong in the DECL nodes. */

and I think that we should explore that possibility a bit more.
The basic problem is that the DECL nodes are not passed down far enough.
The hooks available (ASM_xxx mostly) take strings or, in really high-level
cases, RTL. As a result, new names like !_t__foo are coined to hold
information that really belongs in the DECL node (for example, the t
indicates a function declared, but not yet defined, in this file; if a
definition is seen a new name is constructed). In darwin's case there
are frequently multiple such names derived from more or less the same
source construct, and it's necessary to get from one to the others.
(Formerly this was met by the linked list nodes, which had two children,
different forms of the same name. Now the list nodes are no longer
allocated, a win.) This interface (which I personally strongly dislike)
predates anybody now working on it; I seem to recall it being recommended
in the docs somewhere, but can't find it now.


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