[Mlir-commits] [mlir] [mlir] Fix GCC compilation warning in TuneExtensionOps.cpp (PR #168850)

Rolf Morel llvmlistbot at llvm.org
Fri Nov 21 02:05:53 PST 2025


rolfmorel wrote:

In tablegen, my attempt was to allow all integer types for `OptionalAttr<APIntAttr>:$selected_region_attr`. Instead, this attr -- essentially an index -- should only support non-negative ints (preferably without insisting on a particular bitwidth). @ftynse's solution of confining the attribute, whilst keeping the type as `APIntAttr`, seems a suitable solution! Maybe there could even be a general tablegen class: `APUIntAttr`?

As it is not only _an_ index, but an index to select on of the regions, maybe there already exists (or should exist) an attribute confinement just for that. Would be nice if the verifier could statically catch that the index is out of bounds.


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


More information about the Mlir-commits mailing list