[clang] [flang] [lld] [llvm] [mlir] [Passes] Make PipelineTuningOptions take a LibraryOptionsContext reference (PR #237615)
Alexis Engelke via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 4 01:09:46 PST 2026
aengelke wrote:
> Frontends use PipelineTuningOptions to turn on/off passes (clang (-fno-unroll-loops, -fno-vectorize, -ffuse-loops), flang, rustc and the LTO linkers).
The Clang driver also uses -mllvm extensively. I don't see convincing reason why -fno-unroll-loops & friends in particular should be struct configuration option while plenty of other things (grep for mllvm in clang/lib) get transformed into -mllvm options?
> PassesOptions is private to LLVMPasses (llvm/lib/Passes/PassesOptions.h), and a context's library options can only be set by parsing arguments.
But... front-ends already can and do also pass library options? It doesn't matter that the struct is private, all options are exposed in the API.
https://github.com/llvm/llvm-project/pull/237615
More information about the cfe-commits
mailing list