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

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 16:54:53 PST 2017

vsk added a comment.

In https://reviews.llvm.org/D28964#661149, @xur wrote:

> To vsk: if seems hard to add a test without the compiler part of change. We can add the calls to __llvm_profile_instrument_range(). But to check the result, we need llvm-profdata to dump the counters.
> How about I added the test in projects/compiler-rt/test/profile after committing the compiler change?

Makes sense to me.

Comment at: lib/profile/InstrProfilingValue.c:251
+  __llvm_profile_instrument_target(TargetValue, Data, CounterIndex);
xur wrote:
> vsk wrote:
> > IIUC we get precise counts if TargetValue is in [PreciseRangeStart, PreciseRangeLast], or if LargeValue == INT64_MIN. If so, that doesn't seem quite right, because I thought you only wanted precise counts for in-range values.
> I don't see a problem here: if LargeValue is INT64_MIN,  we will go the second if in the else branch  -- this collapse the out of range values.
Ah, right, sorry about that


More information about the llvm-commits mailing list