[PATCH] D28964: [PGO] Value profile support for value ranges

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 10:22:07 PST 2017


davidxl added a comment.

A general comment.

The range profiling should not be limited to just memory intrinsics.  It should be designed to be a more general interval profiler. Interval profiler is also useful for other value profiling transformations such as mod operation for integer values (x%y). The value profiler can do interval profiling for division x/y and track resulting values in interval [0, 1].

In a more general form, an interval profiler API should specify the following things

1. counter index
2. interval start and end (inclusive) : [S, E]
3. optionally specify the start value of a large value range [SL, inf)

3 + (E-S+1)  values will be tracked:
(-inf, S) one value
[S,E] one for each in the range
[E, SL) one value
[SL, inf) for one.

The client (instrumentor) decides the the interval boundaries depending on the value profile kind.


Repository:
  rL LLVM

https://reviews.llvm.org/D28964





More information about the llvm-commits mailing list