<br clear="all">I have seen <div><div><font class="Apple-style-span" color="#3333FF">INITIALIZE_PASS(LiveVariables, "livevars", "Live Variable Analysis", false, false);</font></div><div>in the llvm/lib/codegen/LiveVariables.cpp, where LiveVariables is a subclass of MachineFunctionPass, and</div>
<div><div><font class="Apple-style-span" color="#3333FF">#define INITIALIZE_PASS(passName, arg, name, cfg, analysis) \</font></div><div><font class="Apple-style-span" color="#3333FF">  static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis)</font></div>
</div><div>in PassSupport.h</div><div><br></div><div>Is this code used to register and initialize a pass? This kind of registration is just the way illustrated in the hello example at <meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://llvm.org/docs/WritingAnLLVMPass.html#registration">http://llvm.org/docs/WritingAnLLVMPass.html#registration</a>.</div>
<div><br></div><div><br></div><div>My problem is:</div><div>I wrote a pass (Mypass), also a subclass of MachineFunctionPass. And I wrote the similar statement:</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color: rgb(51, 51, 255); ">INITIALIZE_PASS(Mypass, "mypass", "Access Analysis", false, false); </span></div>
<div>aiming to register and initialize this new pass. I rebuilt the llvm with the newly added pass, but when I used llc -help-hidden, I could not found the "-mypass" option. How could I enable the new pass and the related option?<br>
-- <br>Best regards,<div><br></div><div>Li Qingan</div><br>
</div></div>