[llvm-dev] How to split module into several ones

John Criswell via llvm-dev llvm-dev at lists.llvm.org
Fri Oct 28 06:33:12 PDT 2016


On 10/27/16 11:18 AM, Aliaksei Zasenka via llvm-dev wrote:
> Hi all,
> Can anyone give me advice about an appropriate way for extracting 
> number of functions from module recursively (starting from entry 
> point). Actually it may be more than one entry point so all dependent 
> functions and global values must be extracted.
>
> I've tried llvm-extract tool but it can't do work recursively. Maybe 
> it would be good to write some Call Graph pass or something. Any thoughts?

I thought llvm-extract conservatively extracted anything that was 
relevant to what it was asked to extract.

In any event, if you need a call graph analysis, there are two call 
graph passes available for LLVM.

The first is the CallGraph pass that comes in the LLVM source tree. It 
is very conservative with function pointers, but its results are 
conservatively correct.

The second is the CallGraph analysis within DSA.  You should be able to 
find a copy for LLVM 3.7 or LLVM 3.8 here 
(https://github.com/jtcriswell/safecode-llvm37) and here 
(https://github.com/jtcriswell/llvm-dsa).

Regards,

John Criswell
>
>
> Thanks in advance,
> Alexey Zasenko
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


-- 
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/20161028/7d454df3/attachment.html>


More information about the llvm-dev mailing list