<html 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;}
@font-face
        {font-family:"Apple Chancery";
        panose-1:3 2 7 2 4 5 6 6 5 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:12.0pt;
        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>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I am trying to use the dependence analyzer in a pass that I am writing and I was surprised to see an incorrect behavior when I try to query DependenceInfo for dependences between instructions. Specifically,
 if the two instructions are loads/stores accessing an array in a loop, the depend() method would return a dependence regardless of the order of instructions specified. (i.e. if the two instructions where L1 and S1, both depend(L1, S1) and depend(S1,L1) would
 return a dependence), even though only one of the two dependences is valid when the chronological order of the instructions is considered. To illustrate consider this example:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">for(int i = 0; i < n; i++) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">S0:   A[i] = …;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">S1:   … = A[i+1];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">In the example, there is an antidependence between S1 and S0 with distance 1. However, when querying DependenceInfo it also returns a flow dependence from S0 to S1. Is this the expected behavior of DependenceInfo
 or Is it a known problem? If it is the expected behavior, is there a way to check if the dependence you are getting back is a correct one or not? Does anyone have any ideas about possible workarounds or solutions?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">- Adel<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-- <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:24.0pt;font-family:"Apple Chancery";color:#203864">Adel Ejjeh<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">PhD Candidate – Computer Science<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">University of Illinois at Urbana Champaign<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">201 N Goodwin Ave, Urbana, IL 61801<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black"><a href="mailto:aejjeh@illinois.edu"><span style="color:#0563C1">aejjeh@illinois.edu</span></a> |
<a href="mailto:adel.ejjeh@gmail.com"><span style="color:#0563C1">adel.ejjeh@gmail.com</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
</body>
</html>