Commit 9aef8e95 by Richard Guenther Committed by Richard Biener

re PR lto/47799 (LTO debug info for early inlined functions missing)

2012-09-28  Richard Guenther  <rguenther@suse.de>

	PR lto/47799
	* lto-streamer-out.c (tree_is_indexable): Make PARM_DECLs global.
	(lto_output_tree_ref): Handle references to them.
	(output_function): Do not output function arguments again.
	* lto-streamer-in.c (input_function): Do not input arguments
	again, nor overwrite them.

From-SVN: r191824
parent b8dbdb12
2012-09-28 Richard Guenther <rguenther@suse.de> 2012-09-28 Richard Guenther <rguenther@suse.de>
PR lto/47799
* lto-streamer-out.c (tree_is_indexable): Make PARM_DECLs global.
(lto_output_tree_ref): Handle references to them.
(output_function): Do not output function arguments again.
* lto-streamer-in.c (input_function): Do not input arguments
again, nor overwrite them.
2012-09-28 Richard Guenther <rguenther@suse.de>
* cgraph.h (symtab_node_base): Re-order and pack fields. * cgraph.h (symtab_node_base): Re-order and pack fields.
2012-09-28 Georg-Johann Lay <avr@gjlay.de> 2012-09-28 Georg-Johann Lay <avr@gjlay.de>
......
...@@ -823,7 +823,6 @@ input_function (tree fn_decl, struct data_in *data_in, ...@@ -823,7 +823,6 @@ input_function (tree fn_decl, struct data_in *data_in,
gimple *stmts; gimple *stmts;
basic_block bb; basic_block bb;
struct cgraph_node *node; struct cgraph_node *node;
tree args, narg, oarg;
fn = DECL_STRUCT_FUNCTION (fn_decl); fn = DECL_STRUCT_FUNCTION (fn_decl);
tag = streamer_read_record_start (ib); tag = streamer_read_record_start (ib);
...@@ -834,22 +833,6 @@ input_function (tree fn_decl, struct data_in *data_in, ...@@ -834,22 +833,6 @@ input_function (tree fn_decl, struct data_in *data_in,
input_struct_function_base (fn, data_in, ib); input_struct_function_base (fn, data_in, ib);
/* Read all function arguments. We need to re-map them here to the
arguments of the merged function declaration. */
args = stream_read_tree (ib, data_in);
for (oarg = args, narg = DECL_ARGUMENTS (fn_decl);
oarg && narg;
oarg = TREE_CHAIN (oarg), narg = TREE_CHAIN (narg))
{
unsigned ix;
bool res;
res = streamer_tree_cache_lookup (data_in->reader_cache, oarg, &ix);
gcc_assert (res);
/* Replace the argument in the streamer cache. */
streamer_tree_cache_insert_at (data_in->reader_cache, narg, ix);
}
gcc_assert (!oarg && !narg);
/* Read all the SSA names. */ /* Read all the SSA names. */
input_ssa_names (ib, data_in, fn); input_ssa_names (ib, data_in, fn);
......
...@@ -125,7 +125,7 @@ static bool ...@@ -125,7 +125,7 @@ static bool
tree_is_indexable (tree t) tree_is_indexable (tree t)
{ {
if (TREE_CODE (t) == PARM_DECL) if (TREE_CODE (t) == PARM_DECL)
return false; return true;
else if (TREE_CODE (t) == VAR_DECL && decl_function_context (t) else if (TREE_CODE (t) == VAR_DECL && decl_function_context (t)
&& !TREE_STATIC (t)) && !TREE_STATIC (t))
return false; return false;
...@@ -237,6 +237,7 @@ lto_output_tree_ref (struct output_block *ob, tree expr) ...@@ -237,6 +237,7 @@ lto_output_tree_ref (struct output_block *ob, tree expr)
case VAR_DECL: case VAR_DECL:
case DEBUG_EXPR_DECL: case DEBUG_EXPR_DECL:
gcc_assert (decl_function_context (expr) == NULL || TREE_STATIC (expr)); gcc_assert (decl_function_context (expr) == NULL || TREE_STATIC (expr));
case PARM_DECL:
streamer_write_record_start (ob, LTO_global_decl_ref); streamer_write_record_start (ob, LTO_global_decl_ref);
lto_output_var_decl_index (ob->decl_state, ob->main_stream, expr); lto_output_var_decl_index (ob->decl_state, ob->main_stream, expr);
break; break;
...@@ -806,9 +807,6 @@ output_function (struct cgraph_node *node) ...@@ -806,9 +807,6 @@ output_function (struct cgraph_node *node)
output_struct_function_base (ob, fn); output_struct_function_base (ob, fn);
/* Output the head of the arguments list. */
stream_write_tree (ob, DECL_ARGUMENTS (function), true);
/* Output all the SSA names used in the function. */ /* Output all the SSA names used in the function. */
output_ssa_names (ob, fn); output_ssa_names (ob, fn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment