Matt Arsenault via llvm-dev
2020-Jul-15 16:31 UTC
[llvm-dev] [RFC] Introducing classes for the codegen driven by new pass manager
> On Jul 15, 2020, at 12:28, Chen, Yuanfang <Yuanfang.Chen at sony.com> wrote: > > In codegen with NPM, I've made all codegen passes (IR or MIR pass) to be only driven by `llc`. Both due to the way NPM registering pass (on-demand&dynamic instead of static initialization in Legacy PM), and reduce the confusion about which tool (`llc` or `opt`) to test codegen IR passes. >I think there’s no real distinction between “codegen” IR passes and noncodegen IR passes. I routinely run “codegen only” passes with opt in conjunction with other passes when experimenting. I think losing the ability to run any IR pass with opt would be a functionality regression. -Matt
Chen, Yuanfang via llvm-dev
2020-Jul-15 16:39 UTC
[llvm-dev] [RFC] Introducing classes for the codegen driven by new pass manager
Indeed, but there is a distinction about their position in the pipeline. We run opt & codegen pipeline separately, “codegen” IR passes run with other “codegen” IR passes. The same goes for regular IR passes. Do you run “codegen” IR passes with regular IR passes? If so, do you mind sharing the use cases? I might have missed this use case. ________________________________________ From: Matt Arsenault <whatmannerofburgeristhis at gmail.com> on behalf of Matt Arsenault <arsenm2 at gmail.com> Sent: Wednesday, July 15, 2020 9:31 AM To: Chen, Yuanfang Cc: Robinson, Paul; llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] [RFC] Introducing classes for the codegen driven by new pass manager> On Jul 15, 2020, at 12:28, Chen, Yuanfang <Yuanfang.Chen at sony.com> wrote: > > In codegen with NPM, I've made all codegen passes (IR or MIR pass) to be only driven by `llc`. Both due to the way NPM registering pass (on-demand&dynamic instead of static initialization in Legacy PM), and reduce the confusion about which tool (`llc` or `opt`) to test codegen IR passes. >I think there’s no real distinction between “codegen” IR passes and noncodegen IR passes. I routinely run “codegen only” passes with opt in conjunction with other passes when experimenting. I think losing the ability to run any IR pass with opt would be a functionality regression. -Matt
Matt Arsenault via llvm-dev
2020-Jul-15 16:43 UTC
[llvm-dev] [RFC] Introducing classes for the codegen driven by new pass manager
> On Jul 15, 2020, at 12:39, Chen, Yuanfang <Yuanfang.Chen at sony.com> wrote: > > Indeed, but there is a distinction about their position in the pipeline. We run opt & codegen pipeline separately, “codegen” IR passes run with other “codegen” IR passes. The same goes for regular IR passes. > > Do you run “codegen” IR passes with regular IR passes? If so, do you mind sharing the use cases? I might have missed this use case.I suppose there are 3 cases: 1. IR passes that are run in the codegen pipeline, but also run in the regular optimization pipeline. For example, AMDGPU runs SROA and a few other “noncodegen” IR passes as part of codegen. These obviously are both. 2. Reducing testcases. I extract the IR at some point in the codegen pipeline, and want to see what happens if I ran other passes at that point. 3. Experiments to see if there is value in moving a codegen IR pass earlier in the pipeline, into the non-codegen IR passes -Matt
Nicolai Hähnle via llvm-dev
2020-Jul-16 07:25 UTC
[llvm-dev] [RFC] Introducing classes for the codegen driven by new pass manager
On Wed, Jul 15, 2020 at 6:39 PM Chen, Yuanfang via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Indeed, but there is a distinction about their position in the pipeline. We run opt & codegen pipeline separately,Why, though? Is there a reason why this inherently makes sense, or is it just a historical accident? At least to me it seems that it would make more sense to run all passes within a single pipeline. Cheers, Nicolai> > Do you run “codegen” IR passes with regular IR passes? If so, do you mind sharing the use cases? I might have missed this use case. > > ________________________________________ > From: Matt Arsenault <whatmannerofburgeristhis at gmail.com> on behalf of Matt Arsenault <arsenm2 at gmail.com> > Sent: Wednesday, July 15, 2020 9:31 AM > To: Chen, Yuanfang > Cc: Robinson, Paul; llvm-dev at lists.llvm.org > Subject: Re: [llvm-dev] [RFC] Introducing classes for the codegen driven by new pass manager > > > > > On Jul 15, 2020, at 12:28, Chen, Yuanfang <Yuanfang.Chen at sony.com> wrote: > > > > In codegen with NPM, I've made all codegen passes (IR or MIR pass) to be only driven by `llc`. Both due to the way NPM registering pass (on-demand&dynamic instead of static initialization in Legacy PM), and reduce the confusion about which tool (`llc` or `opt`) to test codegen IR passes. > > > > > I think there’s no real distinction between “codegen” IR passes and noncodegen IR passes. I routinely run “codegen only” passes with opt in conjunction with other passes when experimenting. I think losing the ability to run any IR pass with opt would be a functionality regression. > > -Matt > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- Lerne, wie die Welt wirklich ist, aber vergiss niemals, wie sie sein sollte.