<div dir="ltr">Thank you Mr. John and Mr. David !<div><br></div><div>Regards,</div><div>Vipin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 6:21 PM, John Criswell <span dir="ltr"><<a href="mailto:jtcriswel@gmail.com" target="_blank">jtcriswel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Dear Sachin,<br>
<br>
You will want to read up on the LLVM Code Generator
infrastructure:
<a href="http://llvm.org/docs/CodeGenerator.html#machine-code-description-classes" target="_blank">http://llvm.org/docs/CodeGenerator.html#machine-code-description-classes</a><br>
<br>
Also, a MachineFunctionPass is nearly the same as an LLVM
FunctionPass except that it operations on MachineFunction objects
instead of Function objects. If you read the "Writing an LLVM
Pass" document (<a href="http://llvm.org/docs/WritingAnLLVMPass.html" target="_blank">http://llvm.org/docs/WritingAnLLVMPass.html</a>) and
understand how to use MachineInstr's, MachineBasicBlocks, and
MachineInstr's, you should be able to figure it out.<br>
<br>
Finally, take a look at the doxygen documentation anytime you need
details on how to use a specific LLVM class, and as David
suggested, take a look at existing code.<br>
<br>
Regards,<br>
<br>
John Criswell<div><div class="h5"><br>
<br>
<br>
On 9/17/14, 4:44 PM, sachin arora wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hello all,
<div><br>
</div>
<div>I need to modify llvm bytecode / native code just before it
is emitted i.e. after all the regular operations and
optimizations are done. I was told that this can be achieved
by implementing a MachineFunctionPass. </div>
<div>I searched the internet for some tutorials or some example
MachineFunctionPass but found nothing. Kindly point some
links, or anything that may help. Thank you.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Sachin</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>