<div dir="ltr">We don't iterate this map. I split this out of <a href="https://reviews.llvm.org/D39609" rel="noreferrer" target="_blank" style="font-size:12.8px">https://reviews.llvm.org/<wbr>D39609</a> because it seemed uncontroversial and forgot to copy the part of the message where I mentioned that.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 14, 2017 at 12:27 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@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">DenseMap's iteration order can be different depending on host's word size because I believe the default hash function produces different hash values on 32-bit than 64-bit. Does lld still produce the same output on both 32/64 hosts?</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 11, 2017 at 4:12 AM, Reid Kleckner via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rnk<br>
Date: Fri Nov 10 11:12:01 2017<br>
New Revision: 317910<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=317910&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=317910&view=rev</a><br>
Log:<br>
Use DenseMap instead of std::map in fixupExports<br>
<br>
Some DLLs have many exports, and this data structure shows up in the<br>
profile of linking content.dll.<br>
<br>
Modified:<br>
    lld/trunk/COFF/DriverUtils.cpp<br>
<br>
Modified: lld/trunk/COFF/DriverUtils.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=317910&r1=317909&r2=317910&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/lld/trunk/COFF/DriverUti<wbr>ls.cpp?rev=317910&r1=317909&<wbr>r2=317910&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/COFF/DriverUtils.cpp (original)<br>
+++ lld/trunk/COFF/DriverUtils.cpp Fri Nov 10 11:12:01 2017<br>
@@ -594,7 +594,7 @@ void fixupExports() {<br>
   }<br>
<br>
   // Uniquefy by name.<br>
-  std::map<StringRef, Export *> Map;<br>
+  DenseMap<StringRef, Export *> Map(Config->Exports.size());<br>
   std::vector<Export> V;<br>
   for (Export &E : Config->Exports) {<br>
     auto Pair = Map.insert(std::make_pair(E.Ex<wbr>portName, &E));<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>