aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-05-10 18:13:52 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-05-10 16:13:52 +0000
commit5c4f225fcfbad841f98fe6b7813bf07de8817cea (patch)
treeaf4fa061a1b315f2199661fa8e32fbeec97d0a94 /gcc/lto-streamer.c
parentde61f46712258bf735c5173e92655569bc732f13 (diff)
downloadgcc-5c4f225fcfbad841f98fe6b7813bf07de8817cea.zip
gcc-5c4f225fcfbad841f98fe6b7813bf07de8817cea.tar.gz
gcc-5c4f225fcfbad841f98fe6b7813bf07de8817cea.tar.bz2
passes.c (ipa_write_summaries_1, [...]): Allocate encoders.
* passes.c (ipa_write_summaries_1, ipa_write_optimization_summaries): Allocate encoders. * lto-section-out.c (lto_new_out_decl_state): Do not allocate it here. * lto-streamer.c (lto_streamer_cache_insert_1): Use alloc pool. (lto_streamer_cache_create): Init alloc pool. (lto_streamer_cache_delete): Free alloc pool. * lto-streamer.h: Include alloc pool. (lto_streamer_cache_d): Use alloc pool. * lto-stramer-out.c (produce_asm_for_decls): Delete fn_out_states. From-SVN: r159230
Diffstat (limited to 'gcc/lto-streamer.c')
-rw-r--r--gcc/lto-streamer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/lto-streamer.c b/gcc/lto-streamer.c
index 01703f1..0ae7c0c 100644
--- a/gcc/lto-streamer.c
+++ b/gcc/lto-streamer.c
@@ -500,7 +500,7 @@ lto_streamer_cache_insert_1 (struct lto_streamer_cache_d *cache,
else
ix = *ix_p;
- entry = XCNEW (struct tree_int_map);
+ entry = (struct tree_int_map *)pool_alloc (cache->node_map_entries);
entry->base.from = t;
entry->to = (unsigned) ix;
*slot = entry;
@@ -762,6 +762,10 @@ lto_streamer_cache_create (void)
cache->node_map = htab_create (101, tree_int_map_hash, tree_int_map_eq, NULL);
+ cache->node_map_entries = create_alloc_pool ("node map",
+ sizeof (struct tree_int_map),
+ 100);
+
/* Load all the well-known tree nodes that are always created by
the compiler on startup. This prevents writing them out
unnecessarily. */
@@ -785,6 +789,7 @@ lto_streamer_cache_delete (struct lto_streamer_cache_d *c)
return;
htab_delete (c->node_map);
+ free_alloc_pool (c->node_map_entries);
VEC_free (tree, gc, c->nodes);
VEC_free (unsigned, heap, c->offsets);
free (c);