So that we require opt -passes= syntax for instrumentation passes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
It's kind of off-topic to this specific change, but I kind of feel like we're fighting an unnecessary crusade to migrate tests to the -passes syntax, which is not really an improvement for simple cases. I wonder if it would be possible to collect any unknown opt arguments that match a pass name and interpret them as -passes automatically?
When I started working on LLVM, I found the opt -instcombine syntax confusing. For extremely simple cases where it's just opt -instcombine with no other flags it makes sense, but once you start adding other passes or flags, it's hard to distinguish at a glance what exactly is happening, and confusing to people unfamiliar with opt syntax. -passes makes this much clearer IMO.
Maybe we could do something with your idea of collecting unknown arguments, but not sure it's worth the confusion. (looks like there's a cl::Sink that does this; it's unused throughout LLVM aside from tests)
WDYT about a short -p alias for -passes?
Maybe this should be an RFC...
LGTM -- I assume you plan to follow up on this by actually dropping the remaining legacy instrumentation passes? Most of them have already been removed.
llvm/test/Instrumentation/DataFlowSanitizer/args-unreachable-bb.ll | ||
---|---|---|
1 | Can drop the verify while here. |
Can drop the verify while here.