[all-commits] [llvm/llvm-project] c8598f: [mlir] Add refineReturnTypes to InferTypeOpInterface
Jacques Pienaar via All-commits
all-commits at lists.llvm.org
Mon Jul 18 22:19:07 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c8598fa22fdf587c00df6966800c8c6d3c62185d
https://github.com/llvm/llvm-project/commit/c8598fa22fdf587c00df6966800c8c6d3c62185d
Author: Jacques Pienaar <jpienaar at google.com>
Date: 2022-07-18 (Mon, 18 Jul 2022)
Changed paths:
M mlir/include/mlir/Interfaces/InferTypeOpInterface.td
M mlir/lib/Interfaces/InferTypeOpInterface.cpp
M mlir/test/lib/Dialect/Test/TestDialect.cpp
M mlir/test/lib/Dialect/Test/TestOps.td
M mlir/test/mlir-tblgen/return-types.mlir
Log Message:
-----------
[mlir] Add refineReturnTypes to InferTypeOpInterface
refineReturnType method shares the same parameters as inferReturnTypes
but gets passed in the return types of the op if known that can be used
during refinement passes or for more op specific error reporting.
Currently the error reporting on failure is generic and doesn't allow
for specializing the returned result based on failure, with this change
what would previously have been a separate trait with specialized
verification can just be handled as part of inferrence rather than
duplicated.
refineReturnTypes behaves like inferReturnTypes if no result types are fed in,
while the current verification is recast as the default implementation for
refineReturnTypes with it calling inferReturnTypes (and so the default type
verification now goes through refine and allows for more op specific inference
mismatch errors).
Differential Revision: https://reviews.llvm.org/D129955
More information about the All-commits
mailing list