[LLVMdev] runtime pass (original) (raw)

Stephen Thomas stephen.warner.thomas at gmail.com
Wed Jul 15 12:20:54 PDT 2015


Marwa,

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:

http://llvm.org/docs/WritingAnLLVMPass.html#specifying-interactions-between-passes

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.

Cheers, Steve

On Wed, Jul 15, 2015 at 10:05 AM, marwayusuf at feng.bu.edu.eg < marwayusuf at feng.bu.edu.eg> wrote:

Dear All

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?

Regards, Marwa Yusuf Teaching Assistant - Computer Engineering Department Faculty of Engineering - Benha University E-JUST PhD Student Computer Science & Engineering Dept.


LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150715/63f1ecd1/attachment.html>



More information about the llvm-dev mailing list