<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;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle18
{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: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" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in">I am about to post the patches to make LAA suitable for Loop Distribution. As you will hopefully find this will make the LAA more generic. I will cc you on the patches.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><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">Sure Adam.<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><b>RuntimeCheckEmitter</b><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">“RuntimeCheckEmitter::addRuntimeCheck”<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">While creating runtime check I have found, some of the things are not getting considered.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">1) No need to check if two read only pointers intersect.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">2) Only need to check pointers between two different dependency sets.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">3) Only need to check pointers in the same alias set<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">I’m sure if we like this to be used by other optimization then not all optimization appreciate<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">above checks. Specifically LoopVersioning does not care about this, it expects all the pointers<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">in a loop should be considered for a memory check. Also it does not care about different<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">dependency set & different alias sets.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">I suggest we can make these checks optional, and give flexibility to users of this class to set it.<o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">I am not sure I follow. The logic is meant to reduce the number of memory checks necessary to ensure the independence of may-alias accesses. We can omit 1-3 but then we would end up with unnecessary checks that
could unnecessarily slow things down.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="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>
<p class="MsoNormal"><span style="color:#1F497D">I just wanted to keep a flexibility open.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">We can give a try to LoopVersioning by keeping point 1 & 3 checks. but I’m not sure about point 2.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Will give a try to your upcoming patch.<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>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><b>LoopAccessAnalysis::analyzeLoop</b><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Here again its very specific to LoopVectorizer.<span class="apple-converted-space"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">The way it handles stores & loads may not be appreciated by other optimization<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">expecting other treatment. I suggest we should think on flexibility for user to<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">override load & store handling. We can provide virtual methods for load & store<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">handling (i.e. analyzeLoads & analyzeStores). Also some of the optimization may not<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">like call instruction, or further they like to analyze call. We should also think on those<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">lines to make some provision.<o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Can you please elaborate how you want to analyze function calls?<o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D">For calls expecting overridable method, providing flexibility to user to redefine behavior.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">There are few possible cases:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">may not like any call in the loop body, or may like only few specific calls.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">or may not like to pass any pointer/address out of loop by calls.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:.5in">AccessAnalysis & LoopAccessAnalysis are tied up dependency check, If some analysis<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">needs same functionality except dependency check then there should be provision available.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">i.e. LoopVersioning needs similar stuff except dependency analysis, for now possibility is<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">extend & rewrite functions by removing dependency checks.<span class="apple-converted-space"> </span><o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">I actually consider the coupling of dependency analysis and memcheck generation as a feature. Since dependence analysis can further disambiguate memory accesses (as in the DependencySet except you mentioned above)
it can reduce the number of run-time memory checks necessary.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#1F497D">As mentioned above I’m not sure this will be useful for loopVersioning.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">But like to give a try with your upcoming patch.<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>
<p class="MsoNormal"><br>
<span style="color:#1F497D">Thanks,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Ashutosh<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>