[Mlir-commits] [mlir] [mlir][SCFToEmitC] Don't convert unsupported types in EmitC (PR #131786)
Longsheng Mou
llvmlistbot at llvm.org
Tue Mar 18 06:02:02 PDT 2025
================
@@ -322,7 +322,11 @@ void SCFToEmitCPass::runOnOperation() {
// Fallback converter
// See note https://mlir.llvm.org/docs/DialectConversion/#type-converter
// Type converters are called most to least recently inserted
- typeConverter.addConversion([](Type t) { return t; });
+ typeConverter.addConversion([](Type type) -> std::optional<Type> {
+ if (emitc::isSupportedEmitCType(type))
+ return type;
+ return {};
----------------
CoTinker wrote:
What the comments change to?
https://github.com/llvm/llvm-project/pull/131786
More information about the Mlir-commits
mailing list