[PATCH] D35149: llvm-profdata: Reduce memory usage by using Error callback rather than member
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 9 19:55:36 PDT 2017
Ah, right, I'd only got the InstrProfWriter APIs when moving function_ref
to the last arg - thanks for the catch!
Updated the InstrProfRecord APIs as suggested (& checked all mentions of
function_ref seem to be the last arg now, I think.
On Sun, Jul 9, 2017 at 7:06 PM David Li via Phabricator <
reviews at reviews.llvm.org> wrote:
> davidxl added inline comments.
>
>
> ================
> Comment at: include/llvm/ProfileData/InstrProf.h:585
> + void merge(function_ref<void(instrprof_error)> Warn,
> + InstrProfValueSiteRecord &Input, uint64_t Weight = 1);
> /// Scale up value profile data counts.
> ----------------
> It is better to get rid of the default weight and move Warn to be the last
> here.
>
>
> ================
> Comment at: include/llvm/ProfileData/InstrProf.h:660
> /// \p Weight.
> - void scale(uint64_t Weight);
> + void scale(function_ref<void(instrprof_error)> Warn, uint64_t Weight);
>
> ----------------
> can Warn be moved to the last for this one?
>
>
> ================
> Comment at: include/llvm/ProfileData/InstrProf.h:729
> // Scale merged value counts by \p Weight.
> - void mergeValueProfData(uint32_t ValueKind, InstrProfRecord &Src,
> + void mergeValueProfData(function_ref<void(instrprof_error)> Warn,
> + uint32_t ValueKind, InstrProfRecord &Src,
> ----------------
> Same here
>
>
> ================
> Comment at: include/llvm/ProfileData/InstrProf.h:734
> // Scale up value profile data count.
> - void scaleValueProfData(uint32_t ValueKind, uint64_t Weight);
> + void scaleValueProfData(function_ref<void(instrprof_error)> Warn,
> + uint32_t ValueKind, uint64_t Weight);
> ----------------
> Same here
>
>
> https://reviews.llvm.org/D35149
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170710/d86e40c9/attachment.html>
More information about the llvm-commits
mailing list