aboutsummaryrefslogtreecommitdiff
path: root/gcc/profile.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2016-11-03 16:24:22 +0100
committerMartin Liska <marxin@gcc.gnu.org>2016-11-03 15:24:22 +0000
commit7d29f8e3dc105bcc948377a3c68250f555119d8c (patch)
treec52598610873862306ffb6e9daafae7f170aa0f9 /gcc/profile.c
parent5de3e2d862e02f7b0c8efe8fbec2c15592302ba9 (diff)
downloadgcc-7d29f8e3dc105bcc948377a3c68250f555119d8c.zip
gcc-7d29f8e3dc105bcc948377a3c68250f555119d8c.tar.gz
gcc-7d29f8e3dc105bcc948377a3c68250f555119d8c.tar.bz2
Make direct emission of time profiler counter
* libgcov-profiler.c (__gcov_time_profiler): Remove. (__gcov_time_profiler_atomic): Likewise. * profile.c (instrument_values): Fix coding style. (branch_prob): Use renamed function. * tree-profile.c (init_ic_make_global_vars): Likewise. (gimple_init_edge_profiler): Rename to gimple_init_gcov_profiler. tree_time_profiler_counter variable declaration. (gimple_gen_time_profiler): Rewrite to do a direct gimple code emission. * value-prof.h: Remove an argument. * gcc.dg/no_profile_instrument_function-attr-1.c: Update scanned output. * gcc.dg/tree-prof/time-profiler-3.c: New test. From-SVN: r241821
Diffstat (limited to 'gcc/profile.c')
-rw-r--r--gcc/profile.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index 2564f07..ef38f98 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -192,15 +192,9 @@ instrument_values (histogram_values values)
gimple_gen_ior_profiler (hist, t, 0);
break;
- case HIST_TYPE_TIME_PROFILE:
- {
- basic_block bb =
- split_edge (single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
- gimple_stmt_iterator gsi = gsi_start_bb (bb);
-
- gimple_gen_time_profiler (t, 0, gsi);
- break;
- }
+ case HIST_TYPE_TIME_PROFILE:
+ gimple_gen_time_profiler (t, 0);
+ break;
default:
gcc_unreachable ();
@@ -1305,7 +1299,7 @@ branch_prob (void)
{
unsigned n_instrumented;
- gimple_init_edge_profiler ();
+ gimple_init_gcov_profiler ();
n_instrumented = instrument_edges (el);