Arthur Eubanks via llvm-dev
2021-Apr-27 15:58 UTC
[llvm-dev] Legacy PM deprecation for optimization pipeline timeline
On Mon, Apr 26, 2021 at 2:33 AM Björn Pettersson A < bjorn.a.pettersson at ericsson.com> wrote:> For a downstream maintainer that is doing regular merges/rebases toward > main (kind of on a daily basis) it is really nice to have a timeline for > this. > > > > A bit unclear to me what your proposal would mean though. Is it that after > the LLVM 13 branch out we could expect that the support for Legacy PM will > start to “disappear” in opt on the main branch (i.e. when the version on > main branch is stepped to 14, which will happen before the LLVM 13 release)? > > > > When it comes to “disappear” I figure that: > > - At some point lit tests, today running new-pm by default, will be > converted to use -passes. > (This should not be a big problem for myself at least. We’ve actually > started to build with the default setting for > ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER, to make sure we use the default for > “upstream” tests/targets, but we are forcing the legacy PM by an override > in opt.cpp for our downstream target.) > - At some point lit tests will stop testing legacy PM completely (no > more using -enable-new-pm=0). > (This is a point in the timeline that could be interesting for us, as > we probably want to have switched over into using new PM downstream before > quality of legacy PM this.) > - At some point passes that are specific to Legacy PM will be removed. > (If I need then downstream I’d probably need to maintain them myself > just like any downstream pass, so shouldn’t be a big problem. However, we > probably want to aim for switching to use new PM downstream before this > happens.) > - At some point in time flags/options like -enable-new-pm and > ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER will be dropped, along with support in > opt.cpp to use the legacy PM. > (Here I think that we definitely want to have switched to use new PM > downstream, because maintaining that OOT is probably more costly.) > > > > Is the plan that all those things will start to happen more or less at > once? >That mostly sounds right to me. We'd still have to have support in opt for the legacy PM to run IR passes that are part of the codegen pipeline. But we could still remove the -enable-new-pm flag after moving tests for passes in the optimization pipeline to use -passes.> > > Regards, > > Björn > > > > > > *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> *On Behalf Of *Arthur > Eubanks via llvm-dev > *Sent:* den 23 april 2021 00:44 > *To:* Shoaib Meenai <smeenai at fb.com> > *Cc:* llvm-dev <llvm-dev at lists.llvm.org> > *Subject:* Re: [llvm-dev] Legacy PM deprecation for optimization pipeline > timeline > > > > Ah you're right. And now I remember that it was intentionally submitted > after the branch. > > So s/12/13/ > > > > On Thu, Apr 22, 2021 at 3:22 PM Shoaib Meenai <smeenai at fb.com> wrote: > > I don’t think the new PM switch is part of LLVM 12. The change to make it > the default landed on February 3rd, which was after the branch cut. If you > examine llvm/CMakeLists.txt on the release/12.x branch, you’ll also see > that ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER still defaults to FALSE. > > > > *From: *llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Arthur > Eubanks via llvm-dev <llvm-dev at lists.llvm.org> > *Reply-To: *Arthur Eubanks <aeubanks at google.com> > *Date: *Thursday, April 22, 2021 at 2:18 PM > *To: *llvm-dev <llvm-dev at lists.llvm.org> > *Subject: *[llvm-dev] Legacy PM deprecation for optimization pipeline > timeline > > > > Splitting this off from the other thread. > > > > We should have a deprecation timeline that revolves around the major > releases. I'd say we announce the legacy PM for the optimization pipeline > to be deprecated the major release after the new PM has been the default. > Looks like the new PM switch made it into LLVM 12. > > > The major blocker right now is that the C API doesn't have hooks into the > new PM infrastructure. llvm/include/llvm-c/Transforms/PassManagerBuilder.h > should be fairly straightforward to port to the new PM, but the API to add > individual passes (e.g. llvm/include/llvm-c/Transforms/Scalar.h) needs to > distinguish between the different types of passes, e.g. module vs function > pass. The new PM has explicit pass nesting, so we'll need to make sure that > we add a function pass to a function pass manager. Or we could simplify > things and force each pass added via the C API to run in isolation (e.g. > two adjacent function passes would run completely separately rather than > being interleaved function-by-function), which doesn't match how pipelines > are constructed everywhere else, but it's already an adhoc API. > > > > At some point after the deprecation announcement we should start cleaning > up tests for passes in the optimization pipeline to use `opt -passes=foo` > rather than `opt -foo`. > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210427/6a0bc88b/attachment.html>
Michael Kruse via llvm-dev
2021-Apr-27 19:39 UTC
[llvm-dev] Legacy PM deprecation for optimization pipeline timeline
Am Di., 27. Apr. 2021 um 10:59 Uhr schrieb Arthur Eubanks via llvm-dev <llvm-dev at lists.llvm.org>:> We'd still have to have support in opt for the legacy PM to run IR passes that are part of the codegen pipeline. But we could still remove the -enable-new-pm flag after moving tests for passes in the optimization pipeline to use -passes.It might be worth noting that the regression tests are currently failing with ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=OFF. If it is still supported till the next release, they should be fixed. See http://meinersbur.de:8011/#/builders/148 Michael