<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 10, 2017 at 11:36 AM, Dehao Chen 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">danielcdh added a comment.<br>
<br>
How should we proceed with this patch?<br>
<br>
There are indeed some code that iterates through this type, e.g.:<br></blockquote><div><br></div><div>Right, that's what I was referring to here: "The only place I see an iteration is when we are computing imports for a module, so I suppose that could affect the debug output ordering, but does that matter (if iteration order is even non-deterministic for DenseMap, and from what I can tell from the LLVM doc linked above it isn't)."</div><div><br></div><div>I don't think this is an issue, and from Mehdi's response it sounds like he agrees.</div><div><br></div><div>I think the patch is good to go. Mehdi - do you concur?</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>
  // Populate the worklist with the import for the functions in the current<br>
  // module<br>
  for (auto &GVSummary : DefinedGVSummaries) {<br>
    if (!Index.isGlobalValueLive(<wbr>GVSummary.second)) {<br>
      DEBUG(dbgs() << "Ignores Dead GUID: " << GVSummary.first << "\n");<br>
      continue;<br>
    }<br>
    auto *Summary = GVSummary.second;<br>
    if (auto *AS = dyn_cast<AliasSummary>(<wbr>Summary))<br>
      Summary = &AS->getAliasee();<br>
    auto *FuncSummary = dyn_cast<FunctionSummary>(<wbr>Summary);<br>
    if (!FuncSummary)<br>
      // Skip import for global variables<br>
      continue;<br>
    DEBUG(dbgs() << "Initalize import for " << GVSummary.first << "\n");<br>
    computeImportForFunction(*<wbr>FuncSummary, Index, ImportInstrLimit,<br>
                             DefinedGVSummaries, Worklist, ImportList,<br>
                             ExportLists);<br>
  }<br>
<br>
<br>
<a href="https://reviews.llvm.org/D35148" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D35148</a><br>
<br>
<br>
<br>
</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:2px solid rgb(213,15,37)">Teresa Johnson |</td><td nowrap style="border-top:2px solid rgb(51,105,232)"> Software Engineer |</td><td nowrap style="border-top:2px solid rgb(0,153,57)"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top:2px solid rgb(238,178,17)"> 408-460-2413</td></tr></tbody></table></span></div>
</div></div>