[clang] [flang] [lld] [llvm] [mlir] [Passes] Make PipelineTuningOptions take a LibraryOptionsContext reference (PR #237615)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 01:52:38 PST 2026


nikic wrote:

I don't think that frontends should need to use string command line options for "reasonable" use. I think it's reasonable to expect that common requirements like enabling/disabling vectorization are handled via API, while exotic use-cases (like tweaking heuristic thresholds of individual passes) are delegated to command line options.

I also generally wouldn't take Clang's option usage as something to emulate -- a lot of what Clang sets via `-mllvm` really, really shouldn't. I expect at least half of those flags should really be module flags, function attributes or target features, before we even get to pipeline tuning options...

(There are also some fun considerations here when it comes to LTO, where the compiler driver and the LTO driver may use different versions of LLVM, and `-mllvm` options are not stable, so not really suitable for communication across that boundary. But this is something of an unsolved problem even when using other mechanisms.)

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


More information about the cfe-commits mailing list