[LLVMdev] function pointer alias analysis

John Criswell jtcriswel at gmail.com
Sun Apr 19 09:19:42 PDT 2015


On 4/19/15 12:09 PM, Jingyue Wu wrote:
> I'm not aware of such analyses in the mainline. Did you try DSAA in 
> the poolalloc project? Also, how precise do you need the analysis to be?

If you use DSA, I recommend using the analysis in CallTargets.cpp and 
using the pass that uses TD instead of EQTD.

As an FYI, I recently discovered that DSA (but not poolalloc) mainline 
compiles with LLVM mainline (thanks Will Dietz!).  On 
https://github.com/jtcriswell/llvm-dsa, I have the LLVM tree and the 
poolalloc tree set up to compile LLVM and DSA.  If you look at the 
source code for CallTargetMarker in 
https://github.com/jtcriswell/llvm-dsa/blob/master/projects/poolalloc/lib/DSA/CallTargets.cpp, 
you'll see what you need to do to get the targets of an indirect 
function call.

If you have any questions, please let me know.

Regards,

John Criswell

> On Sat, Apr 18, 2015 at 5:20 PM Xin Tong <trent.tong at gmail.com 
> <mailto:trent.tong at gmail.com>> wrote:
>
>     Hi
>
>     I see when LLVM builds the CallGraph SCCs. a function calling through
>     a function pointer is conservatively assumed to call internal and
>     external functions. Therefore, it has an edges pointing to the
>     externalnode2, ie. the externalnode representing outgoing calls from
>     this module.
>
>     does LLVM have any function pointer analysis capabilities in the
>     mainline ?
>
>     Thanks,
>     -Trent
>     _______________________________________________
>     LLVM Developers mailing list
>     LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>
>     http://llvm.cs.uiuc.edu
>     http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


-- 
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
http://www.cs.rochester.edu/u/criswell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150419/dfca9dc4/attachment.html>


More information about the llvm-dev mailing list