<div dir="ltr">Hi all,<div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap">There is a problem about how AliasSetTracker merging AliasSet's when meet UnknownInst.</span><br></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap">When adding new pointer it looks for existing AliasSet's aliased with new pointer. And merging them together. It is ok for pointers: if %A mayalias %B and %B mayalias %C then %A mayalias %C.</span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap">But the same logic when adding callsite is wrong (</span><font color="#000000" size="3"><span style="white-space:pre-wrap">findAliasSetForUnknownInst)</span></font><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap">.</span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap"><br></span></div><div><font color="#000000" size="3"><span style="white-space:pre-wrap">Callsite may be known to readonly access one pointer and change the content of other pointer.</span></font></div><div><font color="#000000" size="3"><span style="white-space:pre-wrap">Why to merge together two noalias pointers if they have some mod/ref relationships with common callsite?</span></font></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap">If modrefinfo(%A, %call1) == REF and modrefinfo(%B, %call1) == MOD</span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap">  it doesn't mean %A may/must alias %B.</span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap">AliasSet's for %A and %B must stay independent with corrected access lattice: aliasset(%A).Access |= RefAccess, aliasset(%B).Access |= ModAccess.</span></div><div>And I think new <span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap">UnknownInst must be added to both AliasSet's.</span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap">Or maybe </span><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap">UnknownInst's must be collected in central part - AliasSetTracker, not AliasSet's.</span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap">Am I right?</span></div><div><div><br></div>-- <br><div class="gmail_signature">Best regards,</div><div class="gmail_signature">Andrew Zhogin</div><div class="gmail_signature"><br></div>
</div></div>