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: [RFC][PATHC] Attack PR12245 by fiddling with CONSTRUCTOR


On Mon, Oct 03, 2005 at 07:52:41PM +0200, Richard Guenther wrote:
> A real solution would ditch TREE indices in favor of HOST_WIDE_INT ones...

A real solution would have a tree node that can represent an arbitrarily
large block of target memory as a binary blob.  As much as possible,
the actual data in the constructor would be represented as bytes in the
blob exactly as it will be arranged in target memory.  For user data
without obvious patterns, this is the most compact form we could use
without actually compressing the data.

The binary blob thing falls down when relocations are required.  We'd
need to have a second kind of node to represent these.  A vector of
sequential relocations comes to mind.

I'd expect the top-level constructor node to have something like a
splay tree arranging the sub-blocks of data and relocations.  A tree
is nice because we can fairly easily look up the data at a given 
offset, as well as being able to iterate over the elements in order
when it comes time to write it out.

That combined with a proper set of creation and access functions
should be fairly clean.


r~


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