<div dir="ltr">ThinLTO is fact coupled with PGO naming scheme as of now. It needs to have the same naming scheme to import the right indirect-call function. <div><br></div><div>We can move this options to InstrProf.cpp, but this will break the indirect-call-promotion in thin-lto mode.</div><div>I'm not sure if I understand the reconstruction method. How can this reconstruction affect the importing in thin-lto?</div><div><br></div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 3, 2017 at 4:16 PM, Xinliang David Li <span dir="ltr"><<a href="mailto:davidxl@google.com" target="_blank">davidxl@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Fri, Feb 3, 2017 at 4:00 PM, Teresa Johnson via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">tejohnson added inline comments.<br>
<br>
<br>
================<br>
Comment at: lib/IR/Globals.cpp:159<br>
<span>+    else {<br>
+      if (StaticFuncStripDirNamePrefix != 0)<br>
+        FileName = stripDirPrefix(FileName, StaticFuncStripDirNamePrefix);<br>
</span>----------------<br>
<span>davidxl wrote:<br>
> getGlobalIdentifier is a low level interface. Move this into getPGOFuncName<br>
</span>Rong and I discussed this - putting it here ensures the same naming scheme is used for PGO and for the ThinLTO index. Although for ThinLTO we will likely not want this enabled. I'm not sure if there is a good way to enforce that.<br>
<br></blockquote><div><br></div></span><div>Ideally we should not couple ThinLTO naming scheme with PGO lookup name scheme -- PGO code should be able to 'reconstruct' the original static function name and then use getPGOFuncName to form the lookup name -- but that is for later.</div><div><br></div><div>For now, it is better to isolate this internal option to the domain of PGO only. </div><div><br></div><div>David</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<a href="https://reviews.llvm.org/D29512" rel="noreferrer" target="_blank">https://reviews.llvm.org/D2951<wbr>2</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>
</blockquote></div><br></div></div></div>