[PATCH] D28966: [PGO] Memory intrinsic calls optimization based on profiled size
Rong Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 29 14:43:05 PDT 2017
xur marked 3 inline comments as done.
xur added inline comments.
================
Comment at: lib/Transforms/Instrumentation/IndirectCallPromotion.cpp:794
+ static bool OptionHandled = false;
+ if (!OptionHandled) {
+ getMemOPSizeRangeFromOption(MemOPSizeRange, PreciseRangeStart,
----------------
davidxl wrote:
> Is it correct to guard the parsing here?
>
> Should the parsing be called at the start of the pass with PreciseStart etc as a member variable?
moved to class MemOPSizeOpt
================
Comment at: lib/Transforms/Instrumentation/IndirectCallPromotion.cpp:843
+
+ uint64_t PercentThreshold = DC * MemOPPercentThreshold / 100;
+ if (C < PercentThreshold)
----------------
davidxl wrote:
> Should it use TotalCount here?
The percent threshold use the ratio of current count and remain count.
I refactor the code a bit (by using a function). The new code also compares the count with the count-threshold.
https://reviews.llvm.org/D28966
More information about the llvm-commits
mailing list