<div dir="ltr">Thanks for the replies, Daniel and Matthijs. I added some code to generate the copy constraint, which I think (in the present form) is wrong (or at best not field sensitive):<br><br>+void Andersens::visitGetResultInst(GetResultInst &GR) {<br>
+       if (isa<PointerType>(GR.getType()))<br>+       {<br>+               // P1 = getresult P2 --> <Copy/P1/P2><br>+               Constraints.push_back(Constraint(Constraint::Copy, getNodeValue(GR),<br>+                                                             getNode(GR.getOperand(0))));<br>
+       }<br>+}<br><br>Take for example the getresult statement:<br><br>%mrv_gr = getresult { i64*, i64* } %74, 0 ; ; <i64*> [#uses=1]<br><br>The above code would add the constraint as Copy/%mrv_gr/%74 instead of Copy/%mrv_gr/%74.0 (the actual field which is a pointer). Is there a way in which <br>
one can extract the Value* of the appropriate field of getresult using the index (0 in this case) and the base structure (%74) ? (or is this what you were refering to: "For aggregates in memory, the pointer to the part of the aggregate can simply be used, but no such thing for first class values.",  Matthjis ?)<br>
<br>Since in all the programs on which I am running Andersen's analysis, the only usage of getresult is in accessing non-pointers:<br><br>%mrv_gr205 = getresult { i64, i64 } %615, 1     ; <i64> [#uses=1]<br><br>
, for now, it seems to be ok to just ignore such instructions for pointer analysis (by the above code).<br><br>thanks,<br>Prakash<br><div class="gmail_quote">On Tue, Aug 5, 2008 at 3:59 AM, Matthijs Kooijman <span dir="ltr"><<a href="mailto:matthijs@stdin.nl">matthijs@stdin.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Prakash,<br>
<br>
I think this is highly related to PR2527 [1] and PR2451 [2]. I assume you are<br>
using LLVM 2.3, since current svn automatically replaces getresult with<br>
extractvalue instructions (but doesn't help for Andersen's).<br>
<br>
In either case, it seems that Andersen's currently has no ready made way to<br>
indicate a part of a first-class aggregate (or vector), which is the essence<br>
of the problem here.  For aggregates in memory, the pointer to the part of the<br>
aggregate can simply be used, but no such thing for first class values.<br>
<br>
I'm not really into how Andersen's works, so I won't be able to help you along<br>
with this any further, I'm afraid.<br>
<br>
Gr.<br>
<br>
Matthijs<br>
<br>
[1]: <a href="http://llvm.org/bugs/show_bug.cgi?id=2557" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=2557</a><br>
[2]: <a href="http://llvm.org/bugs/show_bug.cgi?id=2451" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=2451</a><br>
<br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.6 (GNU/Linux)<br>
<br>
iD8DBQFImAhXz0nQ5oovr7wRApujAJ0ZtHgcQ4H0fQy3b4icmz/KyPzqdQCgm60q<br>
YzBoZwlCD26HQ+T5oiMLhGY=<br>
=uEvB<br>
-----END PGP SIGNATURE-----<br>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>