diff options
author | Jan Hubicka <jh@suse.cz> | 2007-01-28 20:38:39 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2007-01-28 19:38:39 +0000 |
commit | 079a182e02a0720f9ac230c212fd202df3e6bd9e (patch) | |
tree | f0b99d930c723a2db6886a47a653581d98be0f1a /gcc/cfgexpand.c | |
parent | 2472200d9c53250482c75443611251490b23e5f2 (diff) | |
download | gcc-079a182e02a0720f9ac230c212fd202df3e6bd9e.zip gcc-079a182e02a0720f9ac230c212fd202df3e6bd9e.tar.gz gcc-079a182e02a0720f9ac230c212fd202df3e6bd9e.tar.bz2 |
expr.c (emit_block_move_via_movmem, [...]): Add variant handling histograms; add wrapper.
* expr.c (emit_block_move_via_movmem, emit_block_move_via_libcall): Add
variant handling histograms; add wrapper.
(clear_storage_via_libcall): Export.
(emit_block_move_hints): Break out from ...; add histograms.
(emit_block_move): ... this one.
(clear_storage_hints): Break out from ...; add histograms.
(clear_storage): ... this one.
(set_storage_via_memset): Handle histogram.
* expr.h (emit_block_move_via_libcall, emit_block_move_hints): Declare.
(clear_storage_hints, clear_storage_via_libcall): Declare.
(set_storage_via_setmem): Update prototype.
* doc/md.texi (movmem, setmem): Document new arguments.
* value-prof.c (dump_histogram_value, tree_find_values_to_profile): Add
new histograms.
(stringop_block_profile): New global function.
(tree_stringops_values_to_profile): Profile block size and alignment.
* value-prof.h (enum hist_type): add HIST_TYPE_AVERAGE and
HIST_TYPE_IOR.
(struct profile_hooks): Add gen_average_profiler and gen_ior_profiler.
(stringop_block_profile): Declare.
* builtins.c: Include value-prof.h.
(expand_builtin_memcpy, expand_builtin_memset): Pass block profile.
* gcov-ui.h (GCOV_COUNTER_NAMES): Add new counter.
(GCOV_COUNTER_AVERAGE, GCOV_COUNTER_IOR): New constants.
(GCOV_COUNTERS, GCOV_LAST_VALUE_COUNTER): Update.
* profile.c (instrument_values): Add new counters.
* cfgexpand.c (expand_gimple_basic_block): Propagate histograms to
calls.
* tree-profile.c (tree_average_profiler_fn, tree_ior_profiler_fn): New.
(tree_init_edge_profiler): Build new profilers.
(tree_gen_average_profiler, tree_gen_ior_profiler): New.
(pass_tree_profile): Add dump.
(tree_profile_hooks): Update.
* Makefile.in (LIBGCOV): Add new constants.
* libgcov.c (__gcov_merge_ior, __gcov_average_profiler,
__gcov_ior_profiler): New.
* i386.md (movmem/setmem expanders): Add new optional arguments.
From-SVN: r121270
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index b91af8e..52ac211 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -1516,9 +1516,12 @@ expand_gimple_basic_block (basic_block bb) /* For the benefit of calls.c, converting all this to rtl, we need to record the call expression, not just the outer modify statement. */ - if (call && call != stmt - && (region = lookup_stmt_eh_region (stmt)) > 0) - add_stmt_to_eh_region (call, region); + if (call && call != stmt) + { + if ((region = lookup_stmt_eh_region (stmt)) > 0) + add_stmt_to_eh_region (call, region); + gimple_duplicate_stmt_histograms (cfun, call, cfun, stmt); + } if (call && CALL_EXPR_TAILCALL (call)) { bool can_fallthru; |