[Mlir-commits] [mlir] [mlir][ArmSME] Remove ArmSMETypeConverter (and configure LLVM one instead) (PR #73639)
Benjamin Maxwell
llvmlistbot at llvm.org
Fri Dec 1 07:17:20 PST 2023
MacDue 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).
https://github.com/llvm/llvm-project/pull/73639
More information about the Mlir-commits
mailing list