Commit 3c8da8a5 by Alexandre Oliva Committed by Alexandre Oliva

tree-ssa-live.c (remove_unused_scope_block_p): Drop declarations and blocks only after inlining.

* tree-ssa-live.c (remove_unused_scope_block_p): Drop
declarations and blocks only after inlining.  Check that
non-empty blocks are not dropped.
* tree-inline.c (expand_call_inline): Check that functions are
not inlined too late.

From-SVN: r130424
parent 573b3837
2007-11-26 Alexandre Oliva <aoliva@redhat.com>, Jan Hubicka <jh@suse.cz>
* tree-ssa-live.c (remove_unused_scope_block_p): Drop
declarations and blocks only after inlining. Check that
non-empty blocks are not dropped.
* tree-inline.c (expand_call_inline): Check that functions are
not inlined too late.
2007-11-26 Ben Elliston <bje@au.ibm.com> 2007-11-26 Ben Elliston <bje@au.ibm.com>
* unwind-dw2-fde.c: Fix comment typo. * unwind-dw2-fde.c: Fix comment typo.
...@@ -2652,6 +2652,8 @@ expand_call_inline (basic_block bb, tree stmt, tree *tp, void *data) ...@@ -2652,6 +2652,8 @@ expand_call_inline (basic_block bb, tree stmt, tree *tp, void *data)
id->src_cfun = DECL_STRUCT_FUNCTION (fn); id->src_cfun = DECL_STRUCT_FUNCTION (fn);
id->call_expr = t; id->call_expr = t;
gcc_assert (!id->src_cfun->after_inlining);
initialize_inlined_parameters (id, t, fn, bb); initialize_inlined_parameters (id, t, fn, bb);
if (DECL_INITIAL (fn)) if (DECL_INITIAL (fn))
......
...@@ -500,8 +500,15 @@ remove_unused_scope_block_p (tree scope) ...@@ -500,8 +500,15 @@ remove_unused_scope_block_p (tree scope)
/* When we are not doing full debug info, we however can keep around /* When we are not doing full debug info, we however can keep around
only the used variables for cfgexpand's memory packing saving quite only the used variables for cfgexpand's memory packing saving quite
a lot of memory. */ a lot of memory. */
else if (debug_info_level != DINFO_LEVEL_NORMAL else if (debug_info_level == DINFO_LEVEL_NORMAL
&& debug_info_level != DINFO_LEVEL_VERBOSE) || debug_info_level == DINFO_LEVEL_VERBOSE
/* Removing declarations before inlining is going to affect
DECL_UID that in turn is going to affect hashtables and
code generation. */
|| !cfun->after_inlining)
unused = false;
else
{ {
*t = TREE_CHAIN (*t); *t = TREE_CHAIN (*t);
next = t; next = t;
...@@ -523,7 +530,10 @@ remove_unused_scope_block_p (tree scope) ...@@ -523,7 +530,10 @@ remove_unused_scope_block_p (tree scope)
nsubblocks ++; nsubblocks ++;
} }
else else
*t = BLOCK_CHAIN (*t); {
gcc_assert (!BLOCK_VARS (*t));
*t = BLOCK_CHAIN (*t);
}
} }
else else
{ {
......
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