[Mlir-commits] [mlir] [mlir][Transforms] Dialect conversion: Context-aware type conversions (PR #140434)
Matthias Springer
llvmlistbot at llvm.org
Sun May 18 18:00:01 PDT 2025
matthias-springer wrote:
> It should be safe to cache any type/value before the type-aware conversion was queried. We could then also document and recommend users to add context-aware conversions last.
You probably mean "to add context-aware conversions first"? The conversions are applied in reverse order. This won't be possible if, let's say you're extending the LLVM type converter.
When this becomes a performance problem, I would start by adding a `Type` template parameter to context-aware type conversions. Similar to what we have for context-unaware type conversions. Then we can keep track of the types that have context-aware conversions. Caching would be deactivated only for those types. I suspect that there won't be much overlap between types that require context-aware and types that require context-unaware conversions.
https://github.com/llvm/llvm-project/pull/140434
More information about the Mlir-commits
mailing list