<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><br>
Hi, <br>
<br>
I am using Scalar Evolution to extract access expressions (for load and store instructions) in terms of the loop induction variables.
<br>
I observe that the Scalar Evolution analysis is returning more expressions than I expect - including ones that are not defined
<br>
in terms of the loop induction variable. For instance in the following code: <br>
<br>
<br>
for(unsigned long int bid = 0; bid < no_of_queries; bid++){<br>
<br>
<div dir="ltr"> unsigned long int currNode = no_of_nodes / 2;<br>
// process levels of the tree <wbr> <wbr> <wbr>
<br>
for(int i = 0; i < logN; i++){<br>
<br>
if((knodes[currNode].key) > keys[bid]){<br>
currNode = knodes[currNode].left_id;<br>
}<br>
else if ((knodes[currNode].key) < keys[bid]){<br>
currNode = knodes[currNode].right_id;<br>
}<br>
else{<br>
break;<br>
}<br>
}</div>
<div dir="ltr">}</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">I expect to extract a SCEV expression for the variable *keys*, however, using ScalarEvolution I also get an expression
<br>
</div>
<div dir="ltr">(using SE->getSCEV) for *knodes*. Since *knodes* does not evolve in terms of the loop induction variable I wasn't expecting to receive a SCEV
<br>
</div>
<div dir="ltr">expression for it. Can anyone please point out how SCEV expressions evolving in terms of the loop induction variable
<br>
</div>
<div dir="ltr">can be distinguished from expressions that are not. <br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">-Hashim</div>
<div dir="ltr">University of Illinois at Urbana-Champaign</div>
<div dir="ltr"><br>
</div>
</div>
</body>
</html>