<div dir="ltr">Marwa,<div><br></div><div>By "runtime", are you referring to the runtime of opt? If so, I assume your question is about how to make sure certain passes run before your pass runs, so that their results are available to your pass. The "Writing an LLVM Pass" doc has a nice section on the interaction between passes:</div><div><br></div><div><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_docs_WritingAnLLVMPass.html-23specifying-2Dinteractions-2Dbetween-2Dpasses&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=_9ut8JSgxWo3Ai9rNOCCJR0yfdURyMWgfTN_H-Bob1w&s=jmjZB6ru4FFaAsiixA5iQjJtKRiE-dksb-x_of7r0xU&e=" target="_blank">http://llvm.org/docs/WritingAnLLVMPass.html#specifying-interactions-between-passes</a><br></div><div><br></div><div>Alternatively, if by "runtime", you are referring to the runtime of the application under analysis, then that's trickier. LLVM is designed to run analysis and transformation passes at compilation time, not runtime. So it depends on what you're trying to do. If you're trying to profile the application to, e.g., gather values of certain variables, that's certainly possible by first writing a transformation pass that instruments the IR with calls at certain points in the target application. </div><div><br></div><div>Cheers,</div><div>Steve</div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 15, 2015 at 10:05 AM, <a href="mailto:marwayusuf@feng.bu.edu.eg" target="_blank">marwayusuf@feng.bu.edu.eg</a> <span dir="ltr"><<a href="mailto:marwayusuf@feng.bu.edu.eg" target="_blank">marwayusuf@feng.bu.edu.eg</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Dear All</p>
<p>I need to create a pass that is triggered to run at a specific point during runtime. Also, this pass needs to have access to object file and to be able to modify the original IR. Any idea how to make such pass?</p>
<p><br>
</p>
<div>
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<div><font size="2"><span style="font-size:10pt">
<div>Regards,<br>
Marwa Yusuf<br>
Teaching Assistant - Computer Engineering Department<br>
Faculty of Engineering - Benha University<br>
E-JUST PhD Student<br>
Computer Science & Engineering Dept.</div>
</span></font></div>
</div>
</div>
</div>
</div>

<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></blockquote></div></div>
</div>