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

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 02:31:40 PDT 2023


ruiling wrote:

 > That is a clear win. The question is: do we want to do it like in this patch? Or by declaring that more passes preserve LowerSwitch as in [jayfoad at c03cbd4](https://github.com/jayfoad/llvm-project/commit/c03cbd4d2f584d24e2100fee529f2ba1d18c345d).

If I understand the situation correctly, your change only work for legacy pass manager? As our goal is to switch to New PM, I think it is better to just remove the `addPreservedID(LowerSwitchID)` and `addRequiredID(LowerSwitchID)` from the passes which depend on `LowerSwitch`? Because that would be what we want the code looks like under NewPM.

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


More information about the llvm-commits mailing list