<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">I have no idea what the previous issue is exactly is. That code is added really long ago and it’s moved/renamed to several files and hardly to trace back. Based
 on the so-far code, that population is not necessary as the construction itself doesn’t iterate on those maps and populate these maps only when necessary. I don’t see any reason the iteration could be invalidated otherwise once the (post)domtree is constructed.
 Also, that population is enabled during post-domtree construction only based on the previous code, which doesn’t make sense.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">- Michael<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Daniel Berlin [mailto:dberlin@dberlin.org]
<br>
<b>Sent:</b> Thursday, January 7, 2016 11:28 AM<br>
<b>To:</b> Liao, Michael <michael.liao@intel.com><br>
<b>Cc:</b> llvm-commits <llvm-commits@lists.llvm.org><br>
<b>Subject:</b> Re: [llvm] r257086 - [DominatorTree] Remove unnecessary map population. NFC.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Can you explain a little bit more?<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">IE what the issue was before you think no longer exists anymore?<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Thu, Jan 7, 2016 at 11:21 AM, Michael Liao via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Author: hliao<br>
Date: Thu Jan  7 13:21:29 2016<br>
New Revision: 257086<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=257086&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=257086&view=rev</a><br>
Log:<br>
[DominatorTree] Remove unnecessary map population. NFC.<br>
<br>
- The reason of population these maps seems not valid any more.<br>
<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/Support/GenericDomTree.h<br>
<br>
Modified: llvm/trunk/include/llvm/Support/GenericDomTree.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GenericDomTree.h?rev=257086&r1=257085&r2=257086&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GenericDomTree.h?rev=257086&r1=257085&r2=257086&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Support/GenericDomTree.h (original)<br>
+++ llvm/trunk/include/llvm/Support/GenericDomTree.h Thu Jan  7 13:21:29 2016<br>
@@ -724,25 +724,17 @@ public:<br>
     if (!this->IsPostDominators) {<br>
       // Initialize root<br>
       NodeT *entry = TraitsTy::getEntryNode(&F);<br>
-      this->Roots.push_back(entry);<br>
-      this->IDoms[entry] = nullptr;<br>
-      this->DomTreeNodes[entry] = nullptr;<br>
+      addRoot(entry);<br>
<br>
       Calculate<FT, NodeT *>(*this, F);<br>
     } else {<br>
       // Initialize the roots list<br>
       for (typename TraitsTy::nodes_iterator I = TraitsTy::nodes_begin(&F),<br>
                                              E = TraitsTy::nodes_end(&F);<br>
-           I != E; ++I) {<br>
+           I != E; ++I)<br>
         if (TraitsTy::child_begin(&*I) == TraitsTy::child_end(&*I))<br>
           addRoot(&*I);<br>
<br>
-        // Prepopulate maps so that we don't get iterator invalidation issues<br>
-        // later.<br>
-        this->IDoms[&*I] = nullptr;<br>
-        this->DomTreeNodes[&*I] = nullptr;<br>
-      }<br>
-<br>
       Calculate<FT, Inverse<NodeT *>>(*this, F);<br>
     }<br>
   }<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>