<div dir="ltr">First you should learn how to write a pass and then a MachineFunctionPass.<br><br>From LLVM website, you can refer to <a href="http://llvm.org/docs/WritingAnLLVMPass.html">http://llvm.org/docs/WritingAnLLVMPass.html</a><br><br>And for outside pass, you can refer to <a href="http://adriansampson.net/blog/llvm.html">http://adriansampson.net/blog/llvm.html</a><div>It's a great article.</div><div>And the author put the source code on <a href="https://github.com/sampsyo/llvm-pass-skeleton">Github</a>.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-01 14:36 GMT+08:00 Balasaheb Dabhade via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal">Hello everyone,</span><br style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal"><br style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal"><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal">I have written simple LLVM passes, but I cannot able to write a MachineFunctionPass pass. </span><br><div><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal">I am following the steps form the following link but it is not working:</span></div><div><font color="#222222" face="Arial, Helvetica, sans-serif"><span style="line-height:normal"><a href="http://www.gabriel.urdhr.fr/2014/09/26/adding-a-llvm-pass/" target="_blank">http://www.gabriel.urdhr.fr/2014/09/26/adding-a-llvm-pass/</a></span></font><br></div><div><font color="#222222" face="Arial, Helvetica, sans-serif"><span style="line-height:normal"><br></span></font></div><div><font color="#222222" face="Arial, Helvetica, sans-serif"><span style="line-height:normal">Please share the sample </span></font><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal">MachineFunctionPass code or steps to follow to write </span><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal">MachineFunctionPass.</span></div><div><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal"><br></span></div><div><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal">Thanks,</span></div><div><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal">Bala</span></div></div><span class="HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div dir="ltr"><div>Thanks,</div>Bala<div>IIITA Allahabad</div></div>
</font></span><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">My best regards to you.<span style="color:rgb(17,17,17);font-family:Helvetica,Arial,sans-serif;font-size:12px;line-height:19.4400005340576px"><br></span></div><div dir="ltr"><span style="color:rgb(17,17,17);font-family:Helvetica,Arial,sans-serif;font-size:12px;line-height:19.4400005340576px"><br></span></div><div dir="ltr"><span style="color:rgb(17,17,17);font-family:Helvetica,Arial,sans-serif;font-size:12px;line-height:19.4400005340576px">     No System Is Safe!</span><div><span style="color:rgb(17,17,17);font-family:Helvetica,Arial,sans-serif;font-size:12px;line-height:19.4400005340576px">     mudongliang</span></div></div></div></div></div></div></div>
</div>