[PATCH] D95832: [SampleFDO][NFC] Add inline keywords to member functions that will be in the template header file
Rong Xu via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 14:34:46 PST 2021
On Tue, Feb 2, 2021 at 1:41 PM David Li via Phabricator <
reviews at reviews.llvm.org> wrote:
> davidxl added a comment.
>
> Ok.
>
> question: it seems SampleCoverageTracker implementation is independent of
> IR/MIR level. Do we need to templatize it ?
>
They will not be templatized. That is the reason I have patch
https://reviews.llvm.org/D95823
This class will be placed into the template header. But since the templated
header is only included into SampleLoader.cpp (IR level), and
FlowSensitiveSampleLoader.cpp (Machine level). I don't see a problem here.
For SampleProfileLoader class, is there any part of of the code that is
> independent of the IR level which can be extracted into a base class (to
> avoid pulling a lot of definitions into header)?
>
Even if the code is independent of IR level implementation, we cannot leave
it in SampleProfile.cpp. We have to either put them into headers , or move
to a standard place (like support or util).
There are some small functions that do not use actual types. But the amount
of code is small. I'm not sure if that is worth the effort.
The large part of the code (find samples, equivalence class, and weight
propagation) needs the actual template type.
>
> CHANGES SINCE LAST ACTION
> https://reviews.llvm.org/D95832/new/
>
> https://reviews.llvm.org/D95832
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210202/37930bf4/attachment.html>
More information about the llvm-commits
mailing list