diff options
author | Jan Hubicka <jh@suse.cz> | 2007-01-03 02:12:56 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2007-01-03 01:12:56 +0000 |
commit | 7a388ee4530a1924bd3e0100078e5179bf5ee18c (patch) | |
tree | 8220e38043cf20d1777f9ce1815232f73e5df606 /gcc/tree-profile.c | |
parent | 93251c58a654a013e1033e7d497faa4a74b20618 (diff) | |
download | gcc-7a388ee4530a1924bd3e0100078e5179bf5ee18c.tar.gz |
pr16194.c: We now output error on all three functions, not just first one.
* gcc.dg/pr16194.c: We now output error on all three functions, not just
first one.
* cgraph.c: Include tree-flow.h
(cgraph_add_new-function): Handle IPA_SSA mode; execute
early_local_passes.
* cgraph.h (enum cgraph_state): Add CGRAPH_STATE_IPA_SSA.
* tree-pass.h (pass_all_early_optimizations): Declare.
* cgraphunit.c (cgraph_process_new_functions): Add IPA_SSA; execute
early_local_passes.
(cgraph_analyze_function): Do early_local_passes.
* tree-mudflap.c (mf_decl_cache_locals, mf_build_check_statement_for):
Do not add referenced vars.
* tree-optimize.c (gate_all_optimizations): Do not execute when not in
SSA form.
(gate_all_early_local_passes): New gate.
(pass_early_local_passes): Use new gate.
(execute_early_local_optimizations): New functions.
(gate_all_early_optimizations): New gate.
(pass_all_early_optimizations): New pass.
(execute_free_datastructures): Free SSA only when initialized.
(gate_init_datastructures): Init only when optimizing.
(tree_lowering_passes): Do early local passes when called late.
* tree-profile.c (do_tree_profiling): Don't profile functions added
late.
(do_early_tree_profiling, pass_early_tree_profile): Kill.
* tree-cfg.c (update_modified_stmts): Do not update when operands are
not active.
* passes.c (init_optimizations_passes): Reorder so we go into SSA
during early_local_passes.
* Makefile.in (cgraph.o): Add dependency on tree-flow.h.
From-SVN: r120373
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r-- | gcc/tree-profile.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index 329ebcd4b6e..3ff39f34aec 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -237,6 +237,10 @@ do_tree_profiling (void) static unsigned int tree_profiling (void) { + /* Don't profile functions produced at destruction time, particularly + the gcov datastructure initializer. */ + if (cgraph_state == CGRAPH_STATE_FINISHED) + return 0; branch_prob (); if (flag_branch_probabilities && flag_profile_values @@ -267,33 +271,6 @@ struct tree_opt_pass pass_tree_profile = 0 /* letter */ }; -/* Return 1 if tree-based profiling is in effect, else 0. - If it is, set up hooks for tree-based profiling. - Gate for pass_tree_profile. */ - -static bool -do_early_tree_profiling (void) -{ - return (do_tree_profiling () && (!flag_unit_at_a_time || !optimize)); -} - -struct tree_opt_pass pass_early_tree_profile = -{ - "early_tree_profile", /* name */ - do_early_tree_profiling, /* gate */ - tree_profiling, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_BRANCH_PROB, /* tv_id */ - PROP_gimple_leh | PROP_cfg, /* properties_required */ - PROP_gimple_leh | PROP_cfg, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_verify_stmts, /* todo_flags_finish */ - 0 /* letter */ -}; - struct profile_hooks tree_profile_hooks = { tree_init_edge_profiler, /* init_edge_profiler */ |