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-nrv.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-nrv.c')
-rw-r--r-- | gcc/tree-nrv.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c index cdf6c3f..f277be9 100644 --- a/gcc/tree-nrv.c +++ b/gcc/tree-nrv.c @@ -226,12 +226,18 @@ tree_nrv (void) return 0; } +static bool +gate_pass_return_slot (void) +{ + return optimize > 0; +} + struct gimple_opt_pass pass_nrv = { { GIMPLE_PASS, "nrv", /* name */ - NULL, /* gate */ + gate_pass_return_slot, /* gate */ tree_nrv, /* execute */ NULL, /* sub */ NULL, /* next */ |