<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 6, 2016 at 12:18 PM, Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</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">Hi David,<div><br></div><div>We've been considering changing the naming scheme for promoted local functions in ThinLTO. Currently we just prepend the file name, but that isn't really sound for a number of reasons (e.g. you can have the same file name in different directories). The alternative we've been thinking about is to use the hash of all external names in the module, as that is guaranteed to be unique within a linkage unit (otherwise the linker would complain).</div><div><br></div><div>We currently (intentionally, I believe) use the same naming scheme for promoting local functions as we do for PGO, </div></div></blockquote><div><br></div><div>No, we don't use this naming scheme for ThinLTO promotion. It is only used for computation of the MD5 hash used in the function index (so that when we want to import a function referenced by indirect call profile info which uses this MD5 name we can find its summary). </div><div><br></div><div>The promotion name is based off a unique module identifier assigned at Thin-link time (when the combined index is generated and all bitcode files are seen).</div><div><br></div><div>Thanks,</div><div>Teresa</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>so we might need to change both. Do you see any back compat concerns with changing the naming scheme? I guess there are various things we can do to try to ensure back compat, but I wanted to get an idea of what the requirements are.</div><div><br></div><div>Thanks,<span class="HOEnZb"><font color="#888888"><br>-- <br><div><div dir="ltr">-- <div>Peter</div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 408-460-2413</td></tr></tbody></table></span></div>
</div></div>