This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Value profile based optimizations, part 1
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, jh at suse dot cz
- Date: Mon, 09 Jun 2003 10:24:25 +0100
- Subject: Re: [PATCH] Value profile based optimizations, part 1
- Organization: Codesourcery LLC
- References: <20030426144640.GA25610@atrey.karlin.mff.cuni.cz> <3EAAA62C.email@example.com> <20030426220941.GA14611@atrey.karlin.mff.cuni.cz> <3EABD519.firstname.lastname@example.org> <20030427163514.GA5895@atrey.karlin.mff.cuni.cz> <3EAE8A13.email@example.com> <20030429153741.GA20897@atrey.karlin.mff.cuni.cz> <3EB3BA9E.firstname.lastname@example.org> <20030503215839.GA7007@atrey.karlin.mff.cuni.cz> <3EB51BF4.email@example.com> <20030608204856.GA23446@atrey.karlin.mff.cuni.cz>
Zdenek Dvorak wrote:
there are several optimizations that may benefit from some knowledge
about values of expressions in the program, e.g specialization of
operations/standard functions, prefetching, decision heuristics for
some optimizations, etc. We have implemented and tested some of them
on hammer-3_3-branch; I think they are ready to be merged to mainline
This patch brings in the means to instrument the program to obtain
data about values of expressions.
Although you have vpt.h and vpt.c, you have inserted code into profile.c
that has intimate knowledge of vpt. The vpt files are small. Would it
not be more sensible to either
1) put all the vpt stuff into profile.h & profile.c
2) put all the vpt stuff into vpt.h & vpt.c
my inclination is for #1?
BTW, is there a less cryptic name than 'vpt'? I can't see in the patch
any description of how these parts all hang together -- some comment
in vpt.h would be nice.
* flags.h (flag_value_histograms): Declare.
why not flag_value_profile? you've called this value profiling after
all? Histogram is the implementation technique, value profiling is
the desired outcome. A user is more likely to understand what the
(GCOV_COUNTER_V_INTERVAL, GCOV_COUNTER_V_POW2, GCOV_COUNTER_V_ONE,
GCOV_COUNTER_V_DELTA): New counter sections.
would GCOV_COUNTER_V_COMMON or GCOV_COUNTER_V_SINGLE be better than
GCOV_COUNTER_V_ONE -- one what?