@@ -67,8 +67,10 @@ def InferTypeOpInterface : OpInterface<"InferTypeOpInterface"> {
67
67
The return types may be elided or specific elements be null for elements
68
68
that should just be returned but not verified.
69
69
70
- Be aware that this method is supposed to be called with valid arguments,
71
- e.g., operands are verified, or it may result in an undefined behavior.
70
+ Because this method can be called from within different stages of IR
71
+ verification, implementations should not assume the arguments to
72
+ represent fully valid IR and are responsible for checking inputs for
73
+ validity to the degree necessary to perform the return type inference.
72
74
}],
73
75
/*retTy=*/"::mlir::LogicalResult",
74
76
/*methodName=*/"refineReturnTypes",
@@ -142,6 +144,11 @@ def InferShapedTypeOpInterface : OpInterface<"InferShapedTypeOpInterface"> {
142
144
Unknown (e.g., unranked) shape and nullptrs for element type and attribute
143
145
may be returned by this function while returning success. E.g., partial
144
146
population of components is not error condition.
147
+
148
+ Because this method can be called from within different stages of IR
149
+ verification, implementations should not assume the arguments to
150
+ represent fully valid IR and are responsible for checking inputs for
151
+ validity to the degree necessary to perform the return type inference.
145
152
}],
146
153
/*retTy=*/"::mlir::LogicalResult",
147
154
/*methodName=*/"inferReturnTypeComponents",
0 commit comments