From 6e885ee3ff4f358d7a7e84b8687f27a61101a25f Mon Sep 17 00:00:00 2001 From: Zdenek Dvorak Date: Wed, 30 Jul 2003 21:23:34 +0200 Subject: combine.c (distribute_notes): Cancel REG_VALUE_PROFILE notes. * combine.c (distribute_notes): Cancel REG_VALUE_PROFILE notes. * gcov-io.h (GCOV_FIRST_VALUE_COUNTER, GCOV_LAST_VALUE_COUNTER, GCOV_N_VALUE_COUNTERS): New. * profile.c (compute_value_histograms): New static function. (branch_prob): Read back the value histograms. * rtl.c (reg_note_name): Add name for REG_VALUE_PROFILE note. * rtl.h (enum reg_note): Add REG_VALUE_PROFILE note. * value-prof.c: Add comment on reading the profile. * value-prof.h (COUNTER_FOR_HIST_TYPE, HIST_TYPE_FOR_COUNTER): New. * doc/invoke.texi (-fprofile-values): Document behavior with -fbranch-probabilities. From-SVN: r69969 --- gcc/value-prof.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gcc/value-prof.c') diff --git a/gcc/value-prof.c b/gcc/value-prof.c index e843ddb..171b304 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -40,9 +40,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA insn_values_to_profile function. This function is called from branch_prob in profile.c and the requested values are instrumented by it in the first compilation with -fprofile-arcs. The optimization may then read the - gathered data in the second compilation with -fbranch-probabilities (the - description of an exact way how to do it will be added here once the - code responsible for reading of the data is merged). */ + gathered data in the second compilation with -fbranch-probablities. + The measured data is appended as REG_VALUE_PROFILE note to the instrumented + insn. The argument to the note consists of an EXPR_LIST where its + members have the following meaning (from the first to the last): + + -- type of information gathered (HIST_TYPE*) + -- the expression that is profiled + -- list of counters starting from the first one. */ static void insn_values_to_profile (rtx, unsigned *, struct histogram_value **); -- cgit v1.1