X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Flto-streamer.c;h=153d2a786083757ade8e4fce3b236ca7033407a8;hb=3e5482040c58423a2a6e5fdb321d630adcea200c;hp=84baeacee9908bfaa9b3e9a5c4c15a8c3a4df5f9;hpb=29737a6d470b7a36109b4f1554a34b872924e481;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/lto-streamer.c b/gcc/lto-streamer.c index 84baeacee99..153d2a78608 100644 --- a/gcc/lto-streamer.c +++ b/gcc/lto-streamer.c @@ -160,6 +160,12 @@ lto_get_section_name (int section_type, const char *name) case LTO_section_cgraph: return concat (LTO_SECTION_NAME_PREFIX, ".cgraph", NULL); + case LTO_section_varpool: + return concat (LTO_SECTION_NAME_PREFIX, ".vars", NULL); + + case LTO_section_refs: + return concat (LTO_SECTION_NAME_PREFIX, ".refs", NULL); + case LTO_section_jump_functions: return concat (LTO_SECTION_NAME_PREFIX, ".jmpfuncs", NULL); @@ -452,7 +458,7 @@ lto_streamer_cache_add_to_node_array (struct lto_streamer_cache_d *cache, if (ix >= (int) VEC_length (tree, cache->nodes)) { size_t sz = ix + (20 + ix) / 4; - VEC_safe_grow_cleared (tree, gc, cache->nodes, sz); + VEC_safe_grow_cleared (tree, heap, cache->nodes, sz); VEC_safe_grow_cleared (unsigned, heap, cache->offsets, sz); } @@ -494,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; @@ -756,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. */ @@ -779,7 +789,8 @@ lto_streamer_cache_delete (struct lto_streamer_cache_d *c) return; htab_delete (c->node_map); - VEC_free (tree, gc, c->nodes); + free_alloc_pool (c->node_map_entries); + VEC_free (tree, heap, c->nodes); VEC_free (unsigned, heap, c->offsets); free (c); }