lto-streamer-out.c (lto_output_ts_block_tree_pointers): Do not output BLOCK_SUBBLOCKS.

2010-10-08  Richard Guenther  <rguenther@suse.de>

	* lto-streamer-out.c (lto_output_ts_block_tree_pointers):
	Do not output BLOCK_SUBBLOCKS.
	* lto-streamer-in.c (lto_input_ts_block_tree_pointers):
	Reserve exact space needed for BLOCK_NONLOCALIZED_VARS.
	Re-construct BLOCK_SUBBLOCKS of parent block.
	(lto_input_ts_binfo_tree_pointers): Reserve exact space needed
	for BINFO_BASE_ACCESSES.

From-SVN: r165190
This commit is contained in:
Richard Guenther 2010-10-08 15:20:13 +00:00 committed by Richard Biener
parent a75bfaa6cd
commit 8686c474f7
3 changed files with 35 additions and 8 deletions

View file

@ -1,3 +1,13 @@
2010-10-08 Richard Guenther <rguenther@suse.de>
* lto-streamer-out.c (lto_output_ts_block_tree_pointers):
Do not output BLOCK_SUBBLOCKS.
* lto-streamer-in.c (lto_input_ts_block_tree_pointers):
Reserve exact space needed for BLOCK_NONLOCALIZED_VARS.
Re-construct BLOCK_SUBBLOCKS of parent block.
(lto_input_ts_binfo_tree_pointers): Reserve exact space needed
for BINFO_BASE_ACCESSES.
2010-10-08 Joseph Myers <joseph@codesourcery.com>
* Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h.

View file

@ -2139,17 +2139,29 @@ lto_input_ts_block_tree_pointers (struct lto_input_block *ib,
BLOCK_VARS (expr) = lto_input_chain (ib, data_in);
len = lto_input_uleb128 (ib);
for (i = 0; i < len; i++)
if (len > 0)
{
tree t = lto_input_tree (ib, data_in);
VEC_safe_push (tree, gc, BLOCK_NONLOCALIZED_VARS (expr), t);
VEC_reserve_exact (tree, gc, BLOCK_NONLOCALIZED_VARS (expr), len);
for (i = 0; i < len; i++)
{
tree t = lto_input_tree (ib, data_in);
VEC_quick_push (tree, BLOCK_NONLOCALIZED_VARS (expr), t);
}
}
BLOCK_SUPERCONTEXT (expr) = lto_input_tree (ib, data_in);
BLOCK_ABSTRACT_ORIGIN (expr) = lto_input_tree (ib, data_in);
BLOCK_FRAGMENT_ORIGIN (expr) = lto_input_tree (ib, data_in);
BLOCK_FRAGMENT_CHAIN (expr) = lto_input_tree (ib, data_in);
BLOCK_SUBBLOCKS (expr) = lto_input_chain (ib, data_in);
/* We re-compute BLOCK_SUBBLOCKS of our parent here instead
of streaming it. For non-BLOCK BLOCK_SUPERCONTEXTs we still
stream the child relationship explicitly. */
if (BLOCK_SUPERCONTEXT (expr)
&& TREE_CODE (BLOCK_SUPERCONTEXT (expr)) == BLOCK)
{
BLOCK_CHAIN (expr) = BLOCK_SUBBLOCKS (BLOCK_SUPERCONTEXT (expr));
BLOCK_SUBBLOCKS (BLOCK_SUPERCONTEXT (expr)) = expr;
}
}
@ -2183,10 +2195,14 @@ lto_input_ts_binfo_tree_pointers (struct lto_input_block *ib,
BINFO_VPTR_FIELD (expr) = lto_input_tree (ib, data_in);
len = lto_input_uleb128 (ib);
for (i = 0; i < len; i++)
if (len > 0)
{
tree a = lto_input_tree (ib, data_in);
VEC_safe_push (tree, gc, BINFO_BASE_ACCESSES (expr), a);
VEC_reserve_exact (tree, gc, BINFO_BASE_ACCESSES (expr), len);
for (i = 0; i < len; i++)
{
tree a = lto_input_tree (ib, data_in);
VEC_quick_push (tree, BINFO_BASE_ACCESSES (expr), a);
}
}
BINFO_INHERITANCE_CHAIN (expr) = lto_input_tree (ib, data_in);

View file

@ -1065,7 +1065,8 @@ lto_output_ts_block_tree_pointers (struct output_block *ob, tree expr,
lto_output_tree_or_ref (ob, BLOCK_ABSTRACT_ORIGIN (expr), ref_p);
lto_output_tree_or_ref (ob, BLOCK_FRAGMENT_ORIGIN (expr), ref_p);
lto_output_tree_or_ref (ob, BLOCK_FRAGMENT_CHAIN (expr), ref_p);
lto_output_chain (ob, BLOCK_SUBBLOCKS (expr), ref_p);
/* Do not output BLOCK_SUBBLOCKS. Instead on streaming-in this
list is re-constructed from BLOCK_SUPERCONTEXT. */
}