<div dir="ltr">There are various opt options [1] that let you specify passes to add at specific points in the pipeline. Also, specifying a target may cause the corresponding TargetMachine to register pass callbacks.<div>Something like "-passes=default<O2>" that creates a full pipeline will add those passes to the pipeline. Otherwise they aren't invoked.<br><div><br></div><div>[1]: <a href="https://github.com/llvm/llvm-project/blob/f5f1a5c2448e31f3c7e6f85b378372a02f8d3e43/llvm/tools/opt/NewPMDriver.cpp#L73">https://github.com/llvm/llvm-project/blob/f5f1a5c2448e31f3c7e6f85b378372a02f8d3e43/llvm/tools/opt/NewPMDriver.cpp#L73</a></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 3, 2020 at 8:29 PM Juneyoung Lee via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello all,<div><br></div><div>Can I register passes at the beginning/end of opt passes (new pass manager)?<br></div><div><br></div><div>I found that registerPipelineStartEPCallback/registerOptimizerLastEPCallback work successfully for clang, but they don't fire when opt -passes="" is used.</div><div><br></div><div>Thanks,</div><div>Juneyoung</div><div><br></div></div></div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>