[llvm-dev] Regarding the project "Create LoopNestPass"
Whitney Tsang via llvm-dev
llvm-dev at lists.llvm.org
Wed Jul 15 03:13:59 PDT 2020
Hi Wayne,
As far as I know, no one is working on this project. Your contribution is
always appreciated.
This project aims to create LoopNestPass in the new pass manager (NPM).
In https://www.youtube.com/watch?v=3pRhvQi7Z10
<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=>
,
you can try to follow along to create a LLVM loop pass in NPM.
There exist different kinds of passes in the NPM, e.g. ModulePass,
FunctionPass, LoopPass.
One or more loop passes can be added in a LoopPassManager, which then can
be added in FunctionPassManager through createFunctionToLoopPassAdaptor.
Examples can be found in llvm/lib/Passes/PassBuilder.cpp.
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.
However, choosing one or the other needs to sacrifice the ability of the
other.
The idea of a LoopNestPass is to combine the benefits of FunctionPass and
LoopPass needed for a loop nest.
On top of LoopNest I would suggest to also get familiar with different
PassAdaptor classes (e.g. FunctionToLoopPassAdaptor).
- llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
I am happy to provide feedback once you have a plan of how to proceed, or
review your patches on Phabricator.
Regards,
Whitney Tsang
On Wed, Jul 15, 2020 at 5:49 AM Wayne Tu via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi,
>
> 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.
> 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?
>
> 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.
>
> I'm looking forward to working on this project.
>
> Thank you very much.
>
> Sincerely,
> Ta-Wei Tu
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200715/3448118a/attachment.html>
More information about the llvm-dev
mailing list