aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-prof.c
diff options
context:
space:
mode:
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>2003-07-30 21:23:34 +0200
committerZdenek Dvorak <rakdver@gcc.gnu.org>2003-07-30 19:23:34 +0000
commit6e885ee3ff4f358d7a7e84b8687f27a61101a25f (patch)
tree3736c245736a667b97a048cf693be5fe11ae12ef /gcc/value-prof.c
parentfd9b4d64fb349ebc9c6aa1fb7f44ce3b42614032 (diff)
downloadgcc-6e885ee3ff4f358d7a7e84b8687f27a61101a25f.zip
gcc-6e885ee3ff4f358d7a7e84b8687f27a61101a25f.tar.gz
gcc-6e885ee3ff4f358d7a7e84b8687f27a61101a25f.tar.bz2
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
Diffstat (limited to 'gcc/value-prof.c')
-rw-r--r--gcc/value-prof.c11
1 files changed, 8 insertions, 3 deletions
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 **);