Closed
Description
Rustc currently still uses the legacy LLVM pass manager. There's been some discussion about enabling NewPM by default for Clang 10, so we might want to start migrating in that direction as well.
To start with, we'd probably want a debug option -Z llvm-pass-manager=new
that is not enabled by default, but can be used to perform initial evaluation.
For reference, this is how newpm use looks like in clang: https://github.com/llvm/llvm-project/blob/90d2be0163e8f84dfc0b73128d873ac8d84c10f8/clang/lib/CodeGen/BackendUtil.cpp#L985