This prevents situations where explicit results types were provided,
which have different types than the operation being replaced. This
is useful for supporting dialect conversion, which will have proper
support added in a followup.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Would an unrealized cast be needed where the replaced op has different type? (I forget if that is automatically handled).
mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp | ||
---|---|---|
888 | This is optimistic check isn't it? E.g., if in a block dominated by this one it would allow it, so only skipping on cheap to check case. |
Cast insertion is handled automatically by the rewriter (see the follow up commit for a test that has that).
mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp | ||
---|---|---|
888 | PDL rewrites only have single block regions, so if the op isn't in the rewriter block (i.e. the current block of the operation) we already know it dominates (i.e. it would be in the matcher). |
mlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp | ||
---|---|---|
888 | Ah, could you expand comment in 885 to capture this? |
This is optimistic check isn't it? E.g., if in a block dominated by this one it would allow it, so only skipping on cheap to check case.