diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-26 06:24:54 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-26 06:24:54 +0000 |
commit | 7f481d3edaef50d86fac145324177ab124283196 (patch) | |
tree | 9f3970e56f7699f3fe29ddd7cc3e98c94ed238ca /gcc/tree-ssa-live.c | |
parent | e0f40ead16de7b33aecee5fcdebca730298b5fdc (diff) | |
download | gcc-7f481d3edaef50d86fac145324177ab124283196.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130424 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r-- | gcc/tree-ssa-live.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index f12de815a39..51d682c1c19 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -500,8 +500,15 @@ remove_unused_scope_block_p (tree scope) /* When we are not doing full debug info, we however can keep around only the used variables for cfgexpand's memory packing saving quite a lot of memory. */ - else if (debug_info_level != DINFO_LEVEL_NORMAL - && debug_info_level != DINFO_LEVEL_VERBOSE) + else if (debug_info_level == DINFO_LEVEL_NORMAL + || 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); next = t; @@ -523,7 +530,10 @@ remove_unused_scope_block_p (tree scope) nsubblocks ++; } else - *t = BLOCK_CHAIN (*t); + { + gcc_assert (!BLOCK_VARS (*t)); + *t = BLOCK_CHAIN (*t); + } } else { |