<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 5/28/15 9:41 PM, rohit bhatia wrote:<br>
</div>
<blockquote
cite="mid:CAGXkHawn7LR00Uqog0yiK1xtO8JKW-1fRtoSfBFRJYvb51vFdQ@mail.gmail.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi<br>
<br>
</div>
I was wondering if there is any way we can run whole
program analysis on more than just one compilation unit. I
would like to include the dynamically loaded libraries
into the call graph too.<br>
</div>
Is there a way to do that?<br>
</div>
</div>
</div>
</blockquote>
<br>
Yes, you can do whole program analysis with LLVM. You can either a)
link the bitcode files of each compilation unit together with
llvm-link and then use opt to run your pass(es) on the whole-program
bitcode file; or b) Modify the LLVM Gold plugin to run your pass.
The former is easier to do; the latter will make it easier to use
your pass(es) on large open-source projects.<br>
<br>
For dynamically loaded libraries, you will need to compile their
source code to LLVM bitcode and link their bitcode files statically
into the program. Alternatively (though this is unlikely to work),
you could use a tool like RevGen to translate their the library
native code into LLVM IR.<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<blockquote
cite="mid:CAGXkHawn7LR00Uqog0yiK1xtO8JKW-1fRtoSfBFRJYvb51vFdQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div><br>
</div>
Thanks and Regards<br>
</div>
Rohit<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.cs.rochester.edu_u_criswell&d=AwMD-g&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=8KXIzhdR5vTjaNst9VC9tepNc6xObCVmkq-IVjxPzeY&s=Zc9SyM-k12IXpitkStRWv8avvS54KP0bKkfgp1lJI4I&e=">http://www.cs.rochester.edu/u/criswell</a></pre>
</body>
</html>