<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 29, 2016, at 11:26 PM, 慕冬亮 via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">First you should learn how to write a pass and then a MachineFunctionPass.<br class=""><br class="">From LLVM website, you can refer to <a href="http://llvm.org/docs/WritingAnLLVMPass.html" class="">http://llvm.org/docs/WritingAnLLVMPass.html</a><br class=""><br class="">And for outside pass, you can refer to <a href="http://adriansampson.net/blog/llvm.html" class="">http://adriansampson.net/blog/llvm.html</a><div class="">It's a great article.</div><div class="">And the author put the source code on <a href="https://github.com/sampsyo/llvm-pass-skeleton" class="">Github</a>.</div></div></div></blockquote><div><br class=""></div><div>See also from the last Dev Meeting: <a href="http://llvm.org/devmtg/2015-10/#tutorial1" class="">http://llvm.org/devmtg/2015-10/#tutorial1</a> (slides and video)</div><div>Github: <a href="https://github.com/quarkslab/llvm-dev-meeting-tutorial-2015" class="">https://github.com/quarkslab/llvm-dev-meeting-tutorial-2015</a></div><div><br class=""></div><div>-- </div><div>Mehdi</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">2016-03-01 14:36 GMT+08:00 Balasaheb Dabhade via llvm-dev <span dir="ltr" class=""><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal" class="">Hello everyone,</span><br style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal" class=""><br style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal" class=""><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal" class="">I have written simple LLVM passes, but I cannot able to write a MachineFunctionPass pass. </span><br class=""><div class=""><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal" class="">I am following the steps form the following link but it is not working:</span></div><div class=""><font color="#222222" face="Arial, Helvetica, sans-serif" class=""><span style="line-height:normal" class=""><a href="http://www.gabriel.urdhr.fr/2014/09/26/adding-a-llvm-pass/" target="_blank" class="">http://www.gabriel.urdhr.fr/2014/09/26/adding-a-llvm-pass/</a></span></font><br class=""></div><div class=""><font color="#222222" face="Arial, Helvetica, sans-serif" class=""><span style="line-height:normal" class=""><br class=""></span></font></div><div class=""><font color="#222222" face="Arial, Helvetica, sans-serif" class=""><span style="line-height:normal" class="">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" class="">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" class="">MachineFunctionPass.</span></div><div class=""><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal" class=""><br class=""></span></div><div class=""><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal" class="">Thanks,</span></div><div class=""><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:normal" class="">Bala</span></div></div><span class="HOEnZb"><font color="#888888" class=""><div dir="ltr" class="">-- <br class=""></div><div dir="ltr" class=""><div class="">Thanks,</div>Bala<div class="">IIITA Allahabad</div></div>
</font></span><br class="">_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
<br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class="">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" class=""><br class=""></span></div><div dir="ltr" class=""><span style="color:rgb(17,17,17);font-family:Helvetica,Arial,sans-serif;font-size:12px;line-height:19.4400005340576px" class=""><br class=""></span></div><div dir="ltr" class=""><span style="color:rgb(17,17,17);font-family:Helvetica,Arial,sans-serif;font-size:12px;line-height:19.4400005340576px" class=""> No System Is Safe!</span><div class=""><span style="color:rgb(17,17,17);font-family:Helvetica,Arial,sans-serif;font-size:12px;line-height:19.4400005340576px" class=""> mudongliang</span></div></div></div></div></div></div></div>
</div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></body></html>