[PATCH] D14464: Add discriminators for call instructions that are from the same line and same basic block.

Diego Novillo via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 7 09:39:16 PST 2015


On Fri, Nov 6, 2015 at 8:38 PM, Dehao Chen <danielcdh at gmail.com> wrote:
>
> danielcdh added a comment.
>
> Sure, we can redesign the sample profile format to index using (line,
column), but this will lead to:
>
> - profile size would nearly double
> - llvm will not be able to use gcc profile
>
> I can do the experiment to measure the debug info impact of this patch.
As discriminator does not happen quite often, so it will only add very
small amount to the debug info size.

Right.  The issue with SamplePGO is that it relies on the debug information
that maps instruction addresses in the sampled data back to source
locations.  If it were to use either discriminator or column info, it would
need to generate column info *and* discriminator information all the time.

Discriminators are not emitted as much as column numbers.  The conversion
tools would have to decide whether to use column numbers or discriminator
numbers when they convert the sampled data.  This would require a way of
deciding whether the value is a column or a discriminator. This adds bulk
and processing time.

One idea we could explore is the introduction of a -g option specifically
designed for PGO. There are several tricks we can do with that which would
not be possible with other user-visible debug options.  We could persisted
the generation of discriminators to this option, for instance.

I'm not convinced the idea is solid, however. Ideally, samplepgo would work
with any debug option used in the original binary.

Diego.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151107/08688405/attachment-0001.html>


More information about the llvm-commits mailing list