[PATCH] D81889: [gicombiner] Allow disable-rule option to disable all-except-...

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 15:24:04 PDT 2020


dsanders added a comment.

In D81889#2096115 <https://reviews.llvm.org/D81889#2096115>, @paquette wrote:

> The point here is to allow people to only enable specific rules, right?


Yes, the point of this change is to support that case. The existing option was to support debugging and bisecting by disabling rules until to see if a miscompile gets resolved and using that to pin the miscompile to a particular rule.

> Maybe an interface like this would be a bit simpler?
> 
> `--my_combiner-only-enable-rules="rule1,rule2,rule3,..."`

The reason I didn't add a second option is because you'd have to define the interaction between them:
`--my_combiner-only-enable-rules=rule1,rule2,rule3 --my_combiner-disable-rule=rule2` sounds like rule 1 and 3 should be the only ones enabled, but then
`--my_combiner-disable-rule=rule2 --my_combiner-only-enable-rules=rule1,rule2,rule3` sounds like it's rule1, 2, and 3 enabled but that's not implementable with the CommandLine library AFAIK. You'd actually get rule1 and 3

In general I'd prefer not to introduce conflicting options, I'll take another look at CommandLine and see if there's anything we can use there.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81889/new/

https://reviews.llvm.org/D81889





More information about the llvm-commits mailing list