[llvm] [RISCV] Introduce a new tune feature string syntax and its parser (PR #168160)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 17 20:07:01 PST 2025
lenary wrote:
> Just had some discussions with Craig on naming and we're wondering: "no-no-xyz" sounds weird and so does "no-disable-xyz". Should we either give those features a better name or using "-" (and potentially "+" for positive features) instead of "no-"? This won't impact the core part of this PR, but just curious about folks' naming preferences.
Double negatives are very confusing, you're right.
We probably want:
```
# Ones already with `no-` prefix lose it for the positive version
-mtune=<cpu>:no-default-unroll # causes no-default-unroll
-mtune=<cpu>:default-unroll # removes no-default-unroll
# Ones with `disable-`:
-mtune=<cpu>:x # removes disable-x
-mtune=<cpu>:no-x # causes disable-x
```
We might have to have a new tablegen class and instances, to make this happen, rather than using the existing SubtargetFeatures (and their currently-internal names). I don't have a problem with adding that, if it means the interface can be clearer.
https://github.com/llvm/llvm-project/pull/168160
More information about the llvm-commits
mailing list