[Mlir-commits] [mlir] [mlir][ArmSME] Remove ArmSMETypeConverter (and configure LLVM one instead) (PR #73639)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri Dec 1 08:28:31 PST 2023


banach-space wrote:

> > This will update the global `LLVMTypeConverter` used during the compilation, right? And so it will update it for all its consumers (even non-SME)? But that should be OK, because it will only happen when lowering to SME?
> > I just want to make sure that we retain the original protection that we gained when splitting this into a dedicated type converter.
> 
> It's not global state, it's updating the single instance of the `LLVMTypeConveter` that's passed to it. Within MLIR core this is a NFC (since we construct a `LLVMTypeConveter` in our `-convert-arm-sme-to-llvm` pass).
> 
> Note that the `ArmSMETypeConverter` did not override any methods, it just called `addConversion` within its constructor. Constructing a new `LLVMTypeConverter`, and then calling `addConversion()` on it is equivalent to that (without an extra class).
> 
> Also, note that adding type conversions needed for patterns is a common thing done within other dialects (such as OpenMP and SPIR-V).

A slightly different question then - is there a test that shows that type conversion fails for vectors scalable in 2 dims? Unless lowering for SME? I think that that would be quite helpful.

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


More information about the Mlir-commits mailing list