diff options
author | Jan Hubicka <jh@suse.cz> | 2008-07-20 18:06:51 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2008-07-20 16:06:51 +0000 |
commit | c72321c9a7c869ae5cb7f5bbec1ea4e8c8d3c50a (patch) | |
tree | b70810f9d05350b4f20a9fb3104039f83b6b3bb3 /gcc/tree-ssa-live.c | |
parent | d6cc6ec9d11523de305be40a6e0e36ea9996de57 (diff) | |
download | gcc-c72321c9a7c869ae5cb7f5bbec1ea4e8c8d3c50a.zip gcc-c72321c9a7c869ae5cb7f5bbec1ea4e8c8d3c50a.tar.gz gcc-c72321c9a7c869ae5cb7f5bbec1ea4e8c8d3c50a.tar.bz2 |
cgraph.c (cgraph_add_new_function): Do early local passes.
* cgraph.c (cgraph_add_new_function): Do early local passes.
* tree-nrv.c (gate_pass_return_slot): New gate.
(pass_nrv): Add the gate.
* tree-ssa-coalese.c (hash_ssa_name_by_var, eq_ssa_name_by_var): New
functions.
(coalesce_ssa_name): Coalesce SSA names.
* tree-ssa-live.c (remove_unused_locals): Be more conservative when
not optimizing so unused user vars remains visible.
* common.opt (flag_tree_ter): Always enable by default.
* tree-ssa-ter.c: Include flags.h
(is_replaceable_p): Check that locations match; when aliasing is missing
be conservative about loads.
* tree-optimize.c (gate_init_datastructures): Remove.
(pass_init_datastructures): New.
* passes.c: Reorder passes so we always go into SSA.
From-SVN: r138010
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r-- | gcc/tree-ssa-live.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index c277980..a5f7596 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -582,7 +582,8 @@ remove_unused_locals (void) var_ann_t ann; bitmap global_unused_vars = NULL; - mark_scope_block_unused (DECL_INITIAL (current_function_decl)); + if (optimize) + mark_scope_block_unused (DECL_INITIAL (current_function_decl)); /* Assume all locals are unused. */ FOR_EACH_REFERENCED_VAR (t, rvi) var_ann (t)->used = false; @@ -661,7 +662,8 @@ remove_unused_locals (void) if (TREE_CODE (var) == VAR_DECL && is_global_var (var) - && bitmap_bit_p (global_unused_vars, DECL_UID (var))) + && bitmap_bit_p (global_unused_vars, DECL_UID (var)) + && (optimize || DECL_ARTIFICIAL (var))) *cell = TREE_CHAIN (*cell); else cell = &TREE_CHAIN (*cell); @@ -681,9 +683,11 @@ remove_unused_locals (void) && TREE_CODE (t) != RESULT_DECL && !(ann = var_ann (t))->used && !ann->symbol_mem_tag - && !TREE_ADDRESSABLE (t)) + && !TREE_ADDRESSABLE (t) + && (optimize || DECL_ARTIFICIAL (t))) remove_referenced_var (t); - remove_unused_scope_block_p (DECL_INITIAL (current_function_decl)); + if (optimize) + remove_unused_scope_block_p (DECL_INITIAL (current_function_decl)); } |