<p>Yeah. That was my guess (and workaround fix) too. Thanks for the quick reply. I just wonder that this didn't occur more often since it seems like a common situation to me to pass a constant zero pointer argument. Anyway, thanks again.</p>

<div class="gmail_quote">On Dec 13, 2010 8:21 PM, "Arushi Aggarwal" <<a href="mailto:arushi987@gmail.com">arushi987@gmail.com</a>> wrote:<br type="attribution">> Hi,<br>> <br>> I believe shouldHaveNodeForValue() should return false for<br>
> ConstantPointerNullValue.<br>> <br>> Fixed in r121707.<br>> <br>> Arushi<br>> <br>> <br>> On Mon, Dec 13, 2010 at 12:10 PM, Kevin Streit<br>> <<a href="mailto:kevin.streit@googlemail.com">kevin.streit@googlemail.com</a>>wrote:<br>
> <br>>> I'm using BUDataStructures... But I tried LocalDatastructures and it didn't<br>>> work either...<br>>>  On Dec 13, 2010 6:52 PM, "Arushi Aggarwal" <<a href="mailto:arushi987@gmail.com">arushi987@gmail.com</a>> wrote:<br>
>> > Hi,<br>>> ><br>>> > Which DSA pass are you using, local/bu/td? I can try looking at this once<br>>> I<br>>> > know that.<br>>> ><br>>> > Arushi<br>>> ><br>
>> ><br>>> > On Mon, Dec 13, 2010 at 11:26 AM, Kevin Streit<br>>> > <<a href="mailto:kevin.streit@googlemail.com">kevin.streit@googlemail.com</a>>wrote:<br>>> ><br>>> >> Hi,<br>
>> >><br>>> >> I'm using DSAnalysis in order to get some points to information. In my<br>>> >> particular case for a CallSite.<br>>> >> Everything is working well except for some special cases. Consider the<br>
>> >> following example code:<br>>> >><br>>> >> // ======================<br>>> >><br>>> >> void m(short *s) {<br>>> >> return;<br>>> >> }<br>
>> >><br>>> >> int main() {<br>>> >> m(0);<br>>> >> }<br>>> >><br>>> >> // ======================<br>>> >><br>>> >> The call to method m in the main method is translated to "call void<br>
>> @m(i16*<br>>> >> null) nounwind ssp".<br>>> >> If I try to call getDSCallSiteForCallSite(...) with the above mentioned<br>>> >> CallSite as argument on the DSGraph of the main method I get a failing<br>
>> >> assertion when the getDSCallSiteForCallSite method tries to get the<br>>> DSNode<br>>> >> (via getNodeForValue(...)) for the "i16* null" argument. So it obviously<br>>> >> thinks it should have a node for that value (since<br>
>> >> shouldHaveNodeForValue(i16* null) returns true) and thus calls<br>>> >> getNodeForValue, which raises the error (The node is not contained in<br>>> the<br>>> >> ScalarMap).<br>
>> >><br>>> >> I tried to verify if I'm using the analysis correctly by invoking the<br>>> >> poolalloc tool on the program which raises a completely different error.<br>>> >><br>
>> >> So under which circumstances is it safe to call<br>>> getDSCallSiteForCallSite?<br>>> >><br>>> >> Or stated otherwise: Should shouldHaveNodeForValue() return true for a<br>>> >> ConstantPointerNullValue?<br>
>> >><br>>> >> Thanks, Kevin<br>>> >><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">http://llvm.cs.uiuc.edu</a><br>
>> >> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>>> >><br>>> >><br>>><br></div>