<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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I would be happy to give it a try :-)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The fact that AA was added at a later point explains the situation a bit, as much fewer SUs should end up in RejectMemNodes without it.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">RejectMemNodes is bad in that it mixes all the SUs together again, after having gone through the work of separating them by analyzing their underlying objects.<o:p></o:p></p>
<p class="MsoNormal">It is also very confusing to have two "stages" of dependency checking, first by mapping an SU to one or more Values, and then to still<o:p></o:p></p>
<p class="MsoNormal">"check everything" that may have been missed.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I would like to try to remove RejectMemNodes (and adjustChainDeps() and iterateChainSucc()) and then simply not clear the MemUses list (while handling a store). “If an SU gets a Value mapping, keep it”.<o:p></o:p></p>
<p class="MsoNormal">If that list grows bigger than a certain limit, intelligent alias querying could stop, just as it stops now in iterateChainSucc when *Depth > 200.<o:p></o:p></p>
<p class="MsoNormal">But it would then at least be done against the right set of SUs, not against "all SUs that sometime did not need an edge".<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What do you think about this, anyone?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">/ Jonas Paulsson<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><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"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Andrew Trick [mailto:atrick@apple.com]
<br>
<b>Sent:</b> den 10 februari 2015 22:12<br>
<b>To:</b> Jonas Paulsson<br>
<b>Cc:</b> Hal Finkel; Mattias Eriksson V; llvmdev@cs.uiuc.edu; Tom Stellard; Sergei Larin; Patrik Hägglund H; Sanjin Sijaric; llvm commits<br>
<b>Subject:</b> Re: [PATCH] Bugfix for missed dependency from store to load in buildSchedGraph().<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Feb 10, 2015, at 6:54 AM, Jonas Paulsson <<a href="mailto:jonas.paulsson@ericsson.com">jonas.paulsson@ericsson.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif"">Looking at the possibility of refactorization / redesign, I wonder what are the main strong<br>
points of this implementation right now, in your opinion? The mapping to underlying objects<br>
looks nice to me, but I am not sure I understand why to go through the trouble of clearing<br>
lists and using a set of RejectMemNodes with adjustChainDeps(). It is very complex code, and<br>
I wonder what is gained in the end here. Does anyone have any thoughts about it?  Is it to handle<br>
huge regions with tons of memory accesses well?</span><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Since you’ve taken the time to understand the algorithm, and are actively benchmarking, it would be great to take advantage of the opportunity to rewrite. Feel free to modify even the core DAG builder implementation, which hasn’t really
 changed since inception--way before my time. The alias-aware scheduling has been around long enough that it makes sense to redesign the core DAG builder code around it, rather than bolt it on. I agree, in its current form, the AA-aware logic is too hard to
 follow.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Andy<o:p></o:p></p>
</div>
</div>
</body>
</html>