Previously the actual types were not shown, which makes the message
difficult to grok in the context of long lowering chains. Also, it
appears that there were no actual tests for this.
Details
Details
- Reviewers
- None
- Commits
- rG34d12c15f7d8: [MLIR] Better message for FuncOp type mismatch
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
Probably. It looks like theres alot of overlap between std::call and spirv::call and probably others. I suspect that all the 'FunctionLike' checking should be factored out.
Comment Actions
Agreed. I was initially going to suggest CallOpInterface (for the operand type checking) to cover even more cases, but realized that for CallOpInterface does not guaranteed that operand and callee argument type will be same, so that's not the place. We can actually factor out a checker to check that the given 2 type ranges are identical (same number and same types) and use that for operand & result checks for CallOp and other places as well.
clang-format: please reformat the code