[Mlir-commits] [mlir] [mlir][emitc] Restrict types in EmitC (PR #88391)
Matthias Gehre
llvmlistbot at llvm.org
Thu May 2 07:26:04 PDT 2024
mgehre-amd wrote:
> To me it seems like the legality check for the Emitter should be in the Emitter, not in the dialect. Then the input to the Emitter can be generated by a multi-stage lowering, where the intermediate IR(s) might contain things not supported by the Emitter, but those things will be legalized away by subsequent transformations.
I prefer the current design because the emitc dialects is exactly meant to represent what can be emitted into C.
For user defined types, like `bf16`, it allows to represent them as a `!emitc.opaque<"mybfloat16_t">` type, which then also doesn't require to change the emitter.
fyi @marbre
https://github.com/llvm/llvm-project/pull/88391
More information about the Mlir-commits
mailing list