aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-live.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-09-06 19:10:00 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2008-09-06 17:10:00 +0000
commitb91bc3493e27d85f69ec4374db5b50656974573f (patch)
tree3bfbb5a00dd14576ae24698df640f819605cdc0d /gcc/tree-ssa-live.c
parent7a687b22659e54dfc9a6354b08b850d63bfd14c0 (diff)
downloadgcc-b91bc3493e27d85f69ec4374db5b50656974573f.zip
gcc-b91bc3493e27d85f69ec4374db5b50656974573f.tar.gz
gcc-b91bc3493e27d85f69ec4374db5b50656974573f.tar.bz2
re PR tree-optimization/14703 (Inadequate optimization of inline templated functions, infinite loop in ipa-reference and memory hog)
PR tree-optimization/14703 * tree-ssa-live.c (remove_unused_scope_block_p): Remove ignored declarations. * passes.c (init_optimization_passes): Recompute inline parameters. * g++.dg/tree-ssa-pr14703.C: New testcase. From-SVN: r140068
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r--gcc/tree-ssa-live.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index fa3834d..859c0c7 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -489,6 +489,13 @@ remove_unused_scope_block_p (tree scope)
if (TREE_CODE (*t) == FUNCTION_DECL)
unused = false;
+ /* Remove everything we don't generate debug info for. */
+ else if (DECL_IGNORED_P (*t))
+ {
+ *t = TREE_CHAIN (*t);
+ next = t;
+ }
+
/* When we are outputting debug info, we usually want to output
info about optimized-out variables in the scope blocks.
Exception are the scope blocks not containing any instructions