<center>
<table border=0 cellpadding=0 width=550 height=600 background="cid:__1137305123_23829@none.net">
<tr>
<td valign="top" align="left"><br>
Oh, your meaning is pointers in a aliasset have equal address logically?<br>
But I think that two pointers are alias means they point to a same <br>
memory object, so if pointers "p" and "q" are alias, it seem as p = q, <br>
not &p = &q.<br>
<br>
Another question is about "forwarding". <br>
"AliasSet[XXXX, 0] may alias, Mod/Ref forwarding to YYYY" (XXXX != YYYY) <br>
means the address XXXX can be regarded as YYYY in interprocedural analysis, <br>
and XXXX should be ignored? <br>
<br>
Thank you.<br>
<br>
>On Sat, 14 Jan 2006, ymxia wrote:<br>
>> 1. The following is the primary body of my pass "fps.cpp":<br>
>><br>
>> AliasAnalysis *AA = &getAnalysis<AliasAnalysis>();<br>
>> AliasSetTracker AST(*AA);<br>
>><br>
>> for (Module::iterator fi = M.begin(), fe = M.end(); fi != fe; ++fi )<br>
>> for (Function::iterator bi = fi->begin(), be = fi->end(); bi != be; ++bi)<br>
>> AST.add(*bi);<br>
>><br>
>> for (AliasSetTracker::iterator I = AST.begin(), E = AST.end(); I != E; ++I) {<br>
>> AliasSet &AS = *I;<br>
>> AS.print (std::cerr);<br>
>> }<br>
>><br>
>> 2. The follwoing is the test program "hello.cpp":<br>
>><br>
>> int *a, *b;<br>
>> int main() {<br>
>> int t;<br>
>> a = &t;<br>
>> b = &t;<br>
>> printf ("%d, %d", a, b);<br>
>> }<br>
>><br>
>> 3. I compiled the test program with "llvm-gcc hello.cpp -o hello", and made alias<br>
>> analysis with:<br>
>> opt -ds-aa -load ../Debug/lib/fps.so -FPS < hello.bc > /dev/null<br>
>><br>
>> opt printed that:<br>
>> AliasSet[XXXX,1] must alis, Mod Pointers: (sbyte** %a, 4)<br>
>> AliasSet[YYYY,1] must alis, Mod Pointers: (sbyte** %b, 4)<br>
>><br>
>> I donot know why "a" and "b" are not alias? They donot point to a same memory<br>
>> object? But, when I donot use DSAA, that is, "opt -load ../Debug/lib/fps.so -FPS <<br>
>> hello.bc > /dev/null", "a" and "b" are alias!<br>
><br>
>This is telling you that &a != &b.<br>
><br>
>-Chris<br>
><br>
>-- <br>
>http://nondot.org/sabre/<br>
>http://llvm.org<br>
<br>
</td>
</tr>
</table>
</center>