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

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 16:13:18 PST 2017


vsk added a comment.

Could you add periods where appropriate in your patch description? It's a little hard to parse it as-is.

Also, this is missing a test. You can add one without the llvm changes, see e.g test/profile/instrprof-value-prof*.

Finally, what's the raw profile change that's needed?



================
Comment at: lib/profile/InstrProfilingValue.c:244
+                                int64_t LargeValue) {
+
+  if (LargeValue != INT64_MIN && (int64_t) TargetValue >= LargeValue)
----------------
Please clang-format this function body.


================
Comment at: lib/profile/InstrProfilingValue.c:251
+
+  __llvm_profile_instrument_target(TargetValue, Data, CounterIndex);
+}
----------------
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.


https://reviews.llvm.org/D28964





More information about the llvm-commits mailing list