[PATCH] D108472: [test] Update some test cases to use -passes when specifying the pipeline

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 24 04:00:41 PDT 2021


bjope added a comment.

In D108472#2960381 <https://reviews.llvm.org/D108472#2960381>, @ctetreau wrote:

> In D108472#2957668 <https://reviews.llvm.org/D108472#2957668>, @nikic wrote:
>
>> I'm not sure doing this is a good idea. The nice thing about the current way of testing is that it works both for the new pass manager and the legacy pass manager. That is, people can flip ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER to false, run the test suite, and get good test coverage for the legacy pass manager. Switching to NewPM-only syntax removes that ability.
>
> How much work would it be to make `--passes='foo,bar'` be equivalent to `-foo -bar` for LPM? Whatever code does this could even complain that LPM is going away and hopefully nudge everyone into working on migrating to NPM.

Since not all pass names have a one-to-one mapping etc I doubt that it is worth the effort to introduce something like that.

I think that what we want to do is to start reducing amount of compatibility hacks that we need to maintain for the pass manager switch (such as dropping support for using the legacy syntax together with the new-PM) rather than adding yet another temporary hack.

As @nikic pointed out, we probably want to remove the ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER option first. Kind of forcing the default in opt to be the new PM. After that one would need to explicitly use `-enable-new-pm=0` to get the legacy PM instead. Given that first step we can start to do cleanup such as this patch, but also probably remove the possibility to use `-enable-new-pm=1` and the old legacy syntax for specifying which opt passes to run unless using `-enable-new-pm=0` .


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108472/new/

https://reviews.llvm.org/D108472



More information about the llvm-commits mailing list