<div dir="ltr"><div dir="ltr"><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif">Hi Wayne,</div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif"><br></div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif">As far as I know, no one is working on this project. Your contribution is always appreciated.</div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif"><br></div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif">This project aims to create LoopNestPass in the new pass manager (NPM).</div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif">In <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.youtube.com_watch-3Fv-3D3pRhvQi7Z10&d=DwMFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=p0DGcdtx8-l1bvwJTLSk1zBTXpb78Y1slqHKTsTpRTE&m=PzTQj0kzu8kuCmHOMYatYGxUnZCBLnJ5ynt0qqlYoSE&s=nDqZ-LcpFAgM1uK4RSlRYDlhQE60FUZmOPjgdW5aTuo&e=" target="_blank" rel="noopener" style="outline:none;color:rgb(65,120,190)">https://www.youtube.com/watch?v=3pRhvQi7Z10</a> , you can try to follow along to create a LLVM loop pass in NPM.<br style="outline:none"><br style="outline:none"></div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif">There exist different kinds of passes in the NPM, e.g. ModulePass, FunctionPass, LoopPass. </div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif">One or more loop passes can be added in a LoopPassManager, which then can be added in FunctionPassManager through createFunctionToLoopPassAdaptor. </div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif">Examples can be found in llvm/lib/Passes/PassBuilder.cpp. </div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif">There exist passes that best operate as a loop nest, e.g. LoopInterchange. For those passes, currently can be written as either FunctionPass or LoopPass.</div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif">However, choosing one or the other needs to sacrifice the ability of the other. </div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif">The idea of a LoopNestPass is to combine the benefits of FunctionPass and LoopPass needed for a loop nest.</div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif"><br style="outline:none"></div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif"><span style="outline:none">On top of LoopNest I would suggest to also get familiar with d</span><span style="outline:none">ifferent PassAdaptor classes (e.g. FunctionToLoopPassAdaptor).</span><br style="outline:none"><span style="outline:none">- llvm/include/llvm/Transforms/</span><span style="outline:none">Scalar/LoopPassManager.h</span></div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif"><span style="outline:none"><br></span></div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif"><span style="outline:none">I am happy to provide feedback once you have a plan of how to proceed, or review your patches on Phabricator.</span></div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif"><span style="outline:none"><br></span></div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif"><span style="outline:none">Regards,</span></div><div style="outline:none;color:rgb(18,18,18);font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif"><span style="outline:none">Whitney Tsang</span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 15, 2020 at 5:49 AM Wayne Tu 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>Hi,</div><div><br></div><div>I'm a college student who is quite new to the community and is interested in contributing to the LLVM project. Although I haven't applied to GSoC, I notice that the project "Create LoopNestPass" seems to be unassigned. <br></div><div>So I'm curious whether anyone is currently working on it, and if not, is it possible for me to work on it as a side-project?</div><div><br></div><div>I've been programming in C++ for quite a while, and I've walked through the `LoopPass`, `LoopNest`, and some other LLVM classes that I think would probably be related to this project. I've also watched some of the videos in the llvm-dev conference regarding loops, so I now have a rough idea on how to implement the LoopNestPass.</div><div><br></div><div>I'm looking forward to working on this project. <br></div><div><br></div><div>Thank you very much.</div><div><br></div><div>Sincerely,</div><div>Ta-Wei Tu<br></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></div>