mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 17:16:04 +00:00
[mlir] update InferTypeOpInterface after c1eab57673ef3e
The change in c1eab57673ef3eb2842c0fbe454d7878854cf54c fixed the behavior of `getDiscardableAttrDictionary` for ops that are not using properties to only return discardable attributes. `InferTypeOpInterface` was relying on the wrong behavior when constructing an adaptor and would assume that all attributes were discardable, which is not the case.
This commit is contained in:
parent
b07bf16a6f
commit
f557f05b8d
@ -240,8 +240,9 @@ LogicalResult mlir::detail::verifyInferredResultTypes(Operation *op) {
|
||||
auto retTypeFn = cast<InferTypeOpInterface>(op);
|
||||
auto result = retTypeFn.refineReturnTypes(
|
||||
op->getContext(), op->getLoc(), op->getOperands(),
|
||||
op->getDiscardableAttrDictionary(), op->getPropertiesStorage(),
|
||||
op->getRegions(), inferredReturnTypes);
|
||||
op->getPropertiesStorage() ? op->getDiscardableAttrDictionary()
|
||||
: op->getAttrDictionary(),
|
||||
op->getPropertiesStorage(), op->getRegions(), inferredReturnTypes);
|
||||
if (failed(result))
|
||||
op->emitOpError() << "failed to infer returned types";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user