<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 2, 2021 at 1:41 PM David Li via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">davidxl added a comment.<br>
<br>
Ok.<br>
<br>
question: it seems SampleCoverageTracker implementation is independent of IR/MIR level. Do we need to templatize it ?<br></blockquote><div>They will not be templatized.  That is the reason I have patch  </div><div><a href="https://reviews.llvm.org/D95823">https://reviews.llvm.org/D95823</a></div><div><br></div><div>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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
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)?<br></blockquote><div><br></div><div>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). </div><div>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.</div><div><br></div><div>The large part of the code (find samples, equivalence class, and weight propagation) needs the actual template type.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D95832/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D95832/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D95832" rel="noreferrer" target="_blank">https://reviews.llvm.org/D95832</a><br>
<br>
</blockquote></div></div>