alias analysis

Hello,

Does the LLVM Andersens alias analysis handle function pointers precisely? I ran it and it looks like it says every function points points to the universal set. Is this what I should expect?

Max

Hi Max,

I don't know the answer offhand but please keep in mind that the current andersen's pass has many known problems and bugs. Consider it "research quality".

-Chris

At one point it handled function pointers.
As chris says, it's buggy and probably broken.
Some function pointers also do point to the universal set (like global
function pointers).

Thanks for the reply.

Would you happen to know whether there a global alias analysis written for LLVM that is more robust? Is the Steensgaard pass any more reliable?

Max

Max Stonebraker wrote:

Thanks for the reply.

Would you happen to know whether there a global alias analysis written for LLVM that is more robust? Is the Steensgaard pass any more reliable?

I don't know anything about the LLVM Steensgaard status, but you could try the DSA analysis included with the poolalloc project.

   svn co http://llvm.org/svn/llvm-project/poolalloc/trunk

It's fast and might be good enough for what you want to do. The poolalloc trunk varies independently from the llvm trunk, and I'm not sure what the current version of it is, though John Criswall sent a message yesterday about interoperability with the current llvm 2.6 branch.

Hope this helps,

Luke

Might I suggest the following patch, because this issue has bite me too? You're lured in by the initial good results from the Andersens alias analysis, only to discover the bugs later on.

Robert Zeh

anders-patch.txt (598 Bytes)

Might I suggest the following patch, because this issue has bite me too? You're lured in by the initial good results from the Andersens alias analysis, only to discover the bugs later on.

Thanks, applied in r80328, along with a flag in the "opt -help" output as well.

-Chris