<br> My PRE pass is invoked using "opt -load -path-to-*.so-file" -my-pre-pass . In that case, I was not required to change include/llvm/LinkAllPasses.h and include/llvm/Transforms/Scalar.h --these two files. What needs to be done to simply run opt "-my-pre-pass"? In the previous, the required pass file is loaded first and then run.<br>
<br><br><div class="gmail_quote">On 23 August 2010 00:28, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca">nicholas@mxc.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">Soumya_Prasad_Ukil wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Look I have written a PRE pass. opt is running that pass. I have<br>
included my pass name there in include/llvm/Support/StandardPasses.h<br>
file. To do that, I have got some error. Because it also requires the<br>
definition of the pass in some other file also. I observed how gvn pre<br>
pass is added to the pass list. I had followed the same way, but failed.<br>
Cna you kindly tell what needs to be done in this regard?<br>
</blockquote>
<br></div>
What's the error you're getting?<br>
<br>
There are two other files, include/llvm/LinkAllPasses.h and include/llvm/Transforms/Scalar.h which I think you would've already added your pass to if "opt -your-pre-pass" was working, but I'll mention them anyway.<br>
<br>
Nick<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
On 23 August 2010 00:13, Nick Lewycky <<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</a><br></div><div class="im">
<mailto:<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</a>>> wrote:<br>
<br>
Soumya_Prasad_Ukil wrote:<br>
<br>
Pls help.<br>
<br>
<br>
You didn't say what was actually running the passes. (llvm-gcc?<br>
clang? opt -some -passes?) What you probably want is to modify one<br>
of the lists in include/llvm/Support/StandardPasses.h.<br>
<br>
Nick<br>
<br>
<br>
On 21 August 2010 17:32, Soumya_Prasad_Ukil<br>
<<a href="mailto:ukil.soumya@gmail.com" target="_blank">ukil.soumya@gmail.com</a> <mailto:<a href="mailto:ukil.soumya@gmail.com" target="_blank">ukil.soumya@gmail.com</a>><br></div>
<mailto:<a href="mailto:ukil.soumya@gmail.com" target="_blank">ukil.soumya@gmail.com</a> <mailto:<a href="mailto:ukil.soumya@gmail.com" target="_blank">ukil.soumya@gmail.com</a>>>><div class="im"><br>
wrote:<br>
<br>
I have written a simple pass. I have been successful to<br>
execute it.<br>
I want LLVM to execute it. I don't know how to include a pass in<br>
llvm actual pass list, such it automatically invokes it just<br>
like<br>
GVNPre pass or some other pass. They have already been limked in<br>
llvm actual pass list.<br>
<br>
--<br>
regards,<br>
soumya prasad ukil<br>
<br>
<br>
<br>
<br>
--<br>
regards,<br>
soumya prasad ukil<br>
<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br></div>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>><div class="im"><br>
<a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
regards,<br>
soumya prasad ukil<br>
</div></blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>regards,<br>soumya prasad ukil<br>