<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>First, thanks for your help.</p>
<p>Actually, I mean the second one, runtime of application. I've already made some instrumentation in the given IR, but only to add some extra code and change some variables. Now, if I want to instrument it to call some function that is able to parse stackmap
 section in the object file and change the given IR itself, is that possible?</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<div class="BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="PlainText">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>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Stephen Thomas <stephen.warner.thomas@gmail.com><br>
<b>Sent:</b> Wednesday, July 15, 2015 9:20 PM<br>
<b>To:</b> marwayusuf@feng.bu.edu.eg<br>
<b>Cc:</b> llvmdev@cs.uiuc.edu<br>
<b>Subject:</b> Re: [LLVMdev] runtime pass</font>
<div> </div>
</div>
<div>
<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=AwMFAw&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=6rTmZhjspQwuyjO5timFdiEiRcwJIu16-WzX_4pa_Fg&s=vDlBPSzU3vGvlc-tM8Gs-EOhaz1hsRvpv7xQBdyuaqw&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>
</div>
</div>
</div>
</body>
</html>