[llvm] [LowerSwitch] Don't let pass manager handle the dependency (PR #68662)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 16:58:56 PDT 2023


ruiling wrote:

> > Some passes has limitation that only support simple terminators: branch/unreachable/return. Right now, they ask the pass manager to add LowerSwitch pass to eliminate `switch`. Let's manage such kind of pass dependency by ourselves. Also add the assertion in the related passes.
> 
> I have no objections, but why do you think it is better to do it this way?

In https://reviews.llvm.org/D89026, @aeubanks said "The NPM doesn't support adding a non-analysis pass as a dependency of another, so I had to add -lowerswitch to some tests or pin them to the legacy PM." I guess it is a burden to support such kind of non-analysis pass dependency in NPM and it is not quite useful in general.

https://github.com/llvm/llvm-project/pull/68662


More information about the llvm-commits mailing list