[LLVMdev] How can I determine safely if a CallSite is "live" in a DSGraphs context

Arushi Aggarwal arushi987 at gmail.com
Mon Dec 13 11:20:41 PST 2010


Hi,

I believe shouldHaveNodeForValue() should return false for
ConstantPointerNullValue.

Fixed in r121707.

Arushi


On Mon, Dec 13, 2010 at 12:10 PM, Kevin Streit
<kevin.streit at googlemail.com>wrote:

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


More information about the llvm-dev mailing list