<div dir="ltr"><div dir="ltr"><div><div style="color:rgb(0,0,0)">Is there a rewriter tool that converts input passes into a string with full adaptor stacks?</div></div><div><br></div><div>It seems manually updating existing tests' passes to have full adaptor stack is a tricky job; it would be great if there is an automatic way of doing that.<br></div><div><br></div><div>Thanks,</div><div>Juneyoung</div><div> </div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 8, 2020 at 3:36 AM Arthur Eubanks <<a href="mailto:aeubanks@google.com">aeubanks@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">You could always specify the full adaptor stack for loop passes, e.g. "module(function(loop(unswitch<nontrivial>)))".<div><br></div><div>Another option is to register your passes via the flags mentioned above and run default<O0>, which should invoke all the registered callbacks.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 7, 2020 at 2:47 AM Juneyoung Lee via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Okay, I tried something like this:<br><div><br></div><div>Given opt -passes='...', my bash script strips the quotes, puts module(mypass) at the begin/end, put quotes again, and runs it. mypass is a module-level pass.</div><div><br></div><div>ex) Given <font face="monospace">opt -passes='sroa' </font>, it emits <font face="monospace">opt -passes='module(mypass),sroa,module(mypass)'</font></div><div><br></div><div>The emitted command seems working in this case, but I found that it breaks when loop-level passes are there:</div><div><br></div><div>ex) Running <font face="monospace">opt -passes='module(mypass),loop(unswitch<nontrivial>),module(mypass)'</font> shows:</div><div>build/bin/opt: invalid use of 'loop' pass as module pipeline<br></div><div><br></div><div><br></div><div>Is there a way to correctly add 'mypass' to the begin/end of the passes regardless of the level of the pipeline?</div><div><br></div><div>Thanks,</div><div>Juneyoung</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 4, 2020 at 1:28 PM Juneyoung Lee <<a href="mailto:juneyoung.lee@sf.snu.ac.kr" target="_blank">juneyoung.lee@sf.snu.ac.kr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color: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>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><br></div><font size="1">Juneyoung Lee</font><div><font size="1">Software Foundation Lab, Seoul National University</font></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>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><br></div><font size="1">Juneyoung Lee</font><div><font size="1">Software Foundation Lab, Seoul National University</font></div></div></div>