This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r185344 - in /branches/pph/gcc: ChangeLog.pph c...
- From: dnovillo at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Tue, 13 Mar 2012 16:56:22 -0000
- Subject: r185344 - in /branches/pph/gcc: ChangeLog.pph c...
Author: dnovillo
Date: Tue Mar 13 16:56:21 2012
New Revision: 185344
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185344
Log:
This patch adds more trees to the preloaded tree cache. This avoids
common trees, built at compiler initialization time, to be streamed
out to PPH images.
These trees are in:
- type_hash_table: The private hash table used in tree.c to
record canonical types. To avoid exposing this table out of
tree.c, I added a traversal routine with a callback argument
(type_hash_table_traverse).
- Builtin types registered with record_builtin_type. I added
a routine pph_register_builtin_type that is called for every
builtin type. We later record those types in
pph_cache_preload.
Another piece of private state that needs to be written out is
canonical_template_parms and nonstandard_integer_type_cache. I added
writer and reader routines to pt.c to do deal with
canonical_template_parms and traversal+callback iterators in tree.c to
deal with nonstandard_integer_type_cache (to avoid middle-end routines
to have to know about PPH).
2012-03-13 Diego Novillo <dnovillo@google.com>
cp/ChangeLog.pph
* decl.c (record_builtin_type): Call pph_register_builtin_type.
* pph-core.c (pph_cache_add_full_tree_r): New.
(pph_cache_add_full_tree): New.
(nitc_callback): New.
(pph_builtin_types): Declare.
(pph_register_builtin_type): New.
(pph_cache_add_builtin_types): New.
(pph_cache_add_canonical_type): New.
(pph_cache_preload): Call pph_cache_add_full_tree instead of
pph_cache_add.
Call traverse_nonstandard_integer_type_cache with nitc_callback.
Call pph_cache_add_builtin_types.
Call type_hash_table_traverse.
* pph-in.c (pph_in_tcc_type): Read TYP_NEXT_PTR_TO for
POINTER_TYPE types.
(pph_read_file_1): Call pph_in_canonical_template_parms.
* pph-out.c (pph_out_tcc_type): Write TYPE_NEXT_PTR_TO for
POINTER_TYPE types.
(pph_write_file): Call pph_out_canonical_template_parms.
* pph.h (pph_register_builtin_type): Declare.
(pph_out_canonical_template_parms): Declare.
(pph_in_canonical_template_parms): Declare.
* pt.c (pph_out_canonical_template_parms): New.
(pph_in_canonical_template_parms): New.
ChangeLog.pph
* tree.c (type_hash_traverse): Declare.
(type_hash_table_retrieve_entry): New.
(type_hash_table_traverse): New.
(type_hash_table_length): New.
(CACHED_PREC_LEN): Factor out of ...
(nonstandard_integer_type_cache): ... here.
(traverse_nonstandard_integer_type_cache): New.
* tree.h (type_hash_table_traverse): Declare.
(type_hash_table_length): Declare.
(traverse_nonstandard_integer_type_cache): Declare.
Modified:
branches/pph/gcc/ChangeLog.pph
branches/pph/gcc/cp/ChangeLog.pph
branches/pph/gcc/cp/decl.c
branches/pph/gcc/cp/pph-core.c
branches/pph/gcc/cp/pph-in.c
branches/pph/gcc/cp/pph-out.c
branches/pph/gcc/cp/pph.h
branches/pph/gcc/cp/pt.c
branches/pph/gcc/tree.c
branches/pph/gcc/tree.h