<div dir="ltr"><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature">On Fri, Apr 13, 2018 at 10:24 AM, Rafael Avila de Espindola via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">espindola added inline comments.<br>
<br>
<br>
================<br>
</span>Comment at: ELF/Config.h:108<br>
   std::vector<uint8_t> BuildIdVector;<br>
+  llvm::MapVector<std::pair<<wbr>const Symbol *, const Symbol *>, uint64_t><br>
+      CallGraphProfile;<br>
----------------<br>
Using Symbol in here causes some duplication. We support duplicated edges, and we have to support two symbols pointing to the same section. This means two maps, this one for symbols and one for edges from section to section.<br>
<br>
If this map is changed to directly map from section to section, we can avoid the second map completely:<br>
<br>
<a href="https://reviews.llvm.org/D45630" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D45630</a><br>
<br>
<br>
<br>
<a href="https://reviews.llvm.org/D36351" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D36351</a><br>
<br>
<br>
<br></blockquote><div><br></div><div>Note that doing this means that when reading the call graph profile from object files we have to keep a separate sym->sym map until the same time we read the text file, although that shouldn't be too much of an issue.</div><div> </div></div>

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">- Michael Spencer</span>

<br></div></div>