<div dir="ltr">Hello,<div><br></div><div>I have written a pass for the IR and I can run it with opt -load lib/LLVMMyPass.so -mypass -myarguments -S -o output.ll < output.bc</div><div><br></div><div>I have registered my pass with the following code:</div><div><div>static RegisterPass<MyPass></div><div>X("mypass", "MyPass Pass (with getAnalysisUsage implemented)");</div></div><div><br></div><div>How do I include the same pass in the clang driver. I tried running the pass:</div><div><br></div><div>clang output.c -o output -Xclang -load -Xclang lib/LLVMMyPass.so -mypass -myarguments</div><div><br></div><div>However, the pass is not being run as I cannot see output from my pass. What is the standard way to do it?</div><div><br></div><div>I have also tried approach described here: <a href="https://www.cs.cornell.edu/~asampson/blog/clangpass.html">https://www.cs.cornell.edu/~asampson/blog/clangpass.html</a> . It didn't work.</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Regards,<div>Soham Sinha</div><div>PhD Student, Department of Computer Science</div><div>Boston University</div></div></div></div></div></div></div></div></div></div>