Ejjeh, Adel via llvm-dev
2020-Oct-22 16:18 UTC
[llvm-dev] Using polly to change loop schedules in an llvm pass
Hello All I am looking into using polly, in conjunction with a set of passes that I am writing, to modify loop schedules/transform loops. I was wondering if there is a way to interface with polly directly through an LLVM pass? It seems by looking at the documentation, that the way to modify loop schedules is to generate the jscop files, modify them, and then reload them with polly, which is not a very “friendly” mechanism to do automatically in a pass. Is my understanding of the usage of polly correct here, or am I missing something? Thanks! -Adel Ejjeh -- Adel Ejjeh PhD Candidate | Computer Science University of Illinois at Urbana Champaign Email: aejjeh at illinois.edu<mailto:aejjeh at illinois.edu> | adel.ejjeh at gmail.com<mailto:adel.ejjeh at gmail.com> Zoom: https://illinois.zoom.us/my/aejjeh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201022/137b18ff/attachment.html>
Johannes Doerfert via llvm-dev
2020-Oct-22 16:52 UTC
[llvm-dev] Using polly to change loop schedules in an llvm pass
Hey Adel, You don't have to go through json per-se but Polly's design also wasn't for the use case you describe. I cc'ed Michael who has some extensions (I think) that allow the frontend to decide how to modify the schedule. You should be able to piggy back on that either through IR annotations or direct calls of the appropriate functions in Polly that modify the schedule tree. Best of luck :) ~ Johannes On 10/22/20 11:18 AM, Ejjeh, Adel via llvm-dev wrote:> Hello All > > I am looking into using polly, in conjunction with a set of passes that I am writing, to modify loop schedules/transform loops. I was wondering if there is a way to interface with polly directly through an LLVM pass? It seems by looking at the documentation, that the way to modify loop schedules is to generate the jscop files, modify them, and then reload them with polly, which is not a very “friendly” mechanism to do automatically in a pass. Is my understanding of the usage of polly correct here, or am I missing something? > > Thanks! > -Adel Ejjeh > -- > Adel Ejjeh > PhD Candidate | Computer Science > University of Illinois at Urbana Champaign > Email: aejjeh at illinois.edu<mailto:aejjeh at illinois.edu> | adel.ejjeh at gmail.com<mailto:adel.ejjeh at gmail.com> > Zoom: https://illinois.zoom.us/my/aejjeh > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Michael Kruse via llvm-dev
2020-Oct-22 18:15 UTC
[llvm-dev] Using polly to change loop schedules in an llvm pass
Hi, for passes that apply to SCoPs I would suggest to write a ScopPass within polly. Importing/exporting a jscop file would be more something for external tools. The reason is that from a LLVM loop- or function-pass it is non-obvious what a SCoP (which is a loop nest that fulfils the requirements for Polly's analysis to work) will be. A ScopPass will just be invoked on previously detected SCoPs, can modify them, and Polly will re-generate LLVM-IR again when all ScopPasses have been applied. Michael Am Do., 22. Okt. 2020 um 11:18 Uhr schrieb Ejjeh, Adel via llvm-dev <llvm-dev at lists.llvm.org>:> > Hello All > > > > I am looking into using polly, in conjunction with a set of passes that I am writing, to modify loop schedules/transform loops. I was wondering if there is a way to interface with polly directly through an LLVM pass? It seems by looking at the documentation, that the way to modify loop schedules is to generate the jscop files, modify them, and then reload them with polly, which is not a very “friendly” mechanism to do automatically in a pass. Is my understanding of the usage of polly correct here, or am I missing something? > > > > Thanks! > > -Adel Ejjeh > > -- > > Adel Ejjeh > > PhD Candidate | Computer Science > > University of Illinois at Urbana Champaign > > Email: aejjeh at illinois.edu | adel.ejjeh at gmail.com > > Zoom: https://illinois.zoom.us/my/aejjeh > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Ejjeh, Adel via llvm-dev
2020-Oct-22 18:18 UTC
[llvm-dev] Using polly to change loop schedules in an llvm pass
I see. Thank you Michael, I will look into that. I'll reach out again if I have any other questions. Regards -Adel -----Original Message----- From: Michael Kruse <llvmdev at meinersbur.de> Sent: Thursday, October 22, 2020 1:15 PM To: Ejjeh, Adel <aejjeh at illinois.edu> Cc: LLVM Dev <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Using polly to change loop schedules in an llvm pass Hi, for passes that apply to SCoPs I would suggest to write a ScopPass within polly. Importing/exporting a jscop file would be more something for external tools. The reason is that from a LLVM loop- or function-pass it is non-obvious what a SCoP (which is a loop nest that fulfils the requirements for Polly's analysis to work) will be. A ScopPass will just be invoked on previously detected SCoPs, can modify them, and Polly will re-generate LLVM-IR again when all ScopPasses have been applied. Michael Am Do., 22. Okt. 2020 um 11:18 Uhr schrieb Ejjeh, Adel via llvm-dev <llvm-dev at lists.llvm.org>:> > Hello All > > > > I am looking into using polly, in conjunction with a set of passes that I am writing, to modify loop schedules/transform loops. I was wondering if there is a way to interface with polly directly through an LLVM pass? It seems by looking at the documentation, that the way to modify loop schedules is to generate the jscop files, modify them, and then reload them with polly, which is not a very “friendly” mechanism to do automatically in a pass. Is my understanding of the usage of polly correct here, or am I missing something? > > > > Thanks! > > -Adel Ejjeh > > -- > > Adel Ejjeh > > PhD Candidate | Computer Science > > University of Illinois at Urbana Champaign > > Email: aejjeh at illinois.edu | adel.ejjeh at gmail.com > > Zoom: https://illinois.zoom.us/my/aejjeh > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Ejjeh, Adel via llvm-dev
2020-Oct-23 17:14 UTC
[llvm-dev] Using polly to change loop schedules in an llvm pass
Hello Michael Is there any good resources you can point me to for a better understanding of the polly internals, something like LLVM’s “Programmer’s Guide” for instance? Thanks -Adel From: Michael Kruse <llvmdev at meinersbur.de> Date: Thursday, October 22, 2020 at 1:16 PM To: Ejjeh, Adel <aejjeh at illinois.edu> Cc: LLVM Dev <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Using polly to change loop schedules in an llvm pass Hi, for passes that apply to SCoPs I would suggest to write a ScopPass within polly. Importing/exporting a jscop file would be more something for external tools. The reason is that from a LLVM loop- or function-pass it is non-obvious what a SCoP (which is a loop nest that fulfils the requirements for Polly's analysis to work) will be. A ScopPass will just be invoked on previously detected SCoPs, can modify them, and Polly will re-generate LLVM-IR again when all ScopPasses have been applied. Michael Am Do., 22. Okt. 2020 um 11:18 Uhr schrieb Ejjeh, Adel via llvm-dev <llvm-dev at lists.llvm.org>:> > Hello All > > > > I am looking into using polly, in conjunction with a set of passes that I am writing, to modify loop schedules/transform loops. I was wondering if there is a way to interface with polly directly through an LLVM pass? It seems by looking at the documentation, that the way to modify loop schedules is to generate the jscop files, modify them, and then reload them with polly, which is not a very “friendly” mechanism to do automatically in a pass. Is my understanding of the usage of polly correct here, or am I missing something? > > > > Thanks! > > -Adel Ejjeh > > -- > > Adel Ejjeh > > PhD Candidate | Computer Science > > University of Illinois at Urbana Champaign > > Email: aejjeh at illinois.edu | adel.ejjeh at gmail.com > > Zoom: https://illinois.zoom.us/my/aejjeh > > > > _______________________________________________ > 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/20201023/7f3e8e9d/attachment.html>