Issues with TYPE_CACHED_VALUES
Nathan Sidwell
nathan@codesourcery.com
Tue Aug 24 11:05:00 GMT 2004
Richard Kenner wrote:
> This is what is causing the failure of Ada to run at all. I thought it was
> something else, but hadn't done a "cvs update" on my tree for a few days, so
> didn't pick it up yet.
>
> There are a number of issues.
>
> (1) Ada uses TYPE_VALUES for INTGER_CST, which is now TYPE_CACHED_VALUES.
> That's easy to fix and actually eliminates the last such "stealth usage" from
> ada-tree.h.
I've not addressed this one. Where do you suggest TYPE_RM_SIZE_INT moves to?
I did find a similar problem with objective_c, in that it was using the
TREE_PUBLIC flag of a type. This patch fixes that one.
> (2) The size of the cache allocated is INTEGER_SHARE_LIMIT for unsigned, but
> that plus one for signed. But when it's allocated in stor-layout.c, it just
> uses INTEGER_SHARE_LIMIT. However, sizetypes can be signed, and are for Ada.
> This also is easy to fix, but I don't understand why the cache has to be
> allocated there, though it may have to with the next item.
It needs to be allocated here, because TYPE_ORIG_SIZE_TYPE is held in
the vector of cached values (it was on the TYPE_VALUES field).
> (3) When an INTEGER_CST is copied, TYPE_CACHED_VALUES needs to be cleared. I
> think this should be done in copy_node. Instead, it's done in some callers,
> but misses some. The one that causes problems is in tree-inline.c, but I
> strongly suspect there are others.
yeah, I think copy_node should clear the cache. Fixed with this patch.
I've changed the way set_sizetype works. Rather than have an early_type_list,
which then gets fixedup, I directly overwrite the stub nodes that
initialize_sizetypes creates. You'll notice that this will allow sizetype_tab
to be subsumed into the global trees array, as nothing now needs to iterate
over it. I'll get to that in a later patch.
booted & tested on i686-pc-linux-gnu, ok?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kenner.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040824/364f3791/attachment.ksh>
More information about the Gcc-patches
mailing list