summaryrefslogtreecommitdiff
path: root/mlir/include/mlir/IR/OpDefinition.h
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/include/mlir/IR/OpDefinition.h')
-rw-r--r--mlir/include/mlir/IR/OpDefinition.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h
index d08d3de350f3..71864def4543 100644
--- a/mlir/include/mlir/IR/OpDefinition.h
+++ b/mlir/include/mlir/IR/OpDefinition.h
@@ -1890,11 +1890,12 @@ private:
if constexpr (has_fold_adaptor_single_result_v<ConcreteOpT>) {
if constexpr (hasProperties()) {
result = cast<ConcreteOpT>(op).fold(typename ConcreteOpT::FoldAdaptor(
- operands, op->getAttrDictionary(),
+ operands, op->getDiscardableAttrDictionary(),
cast<ConcreteOpT>(op).getProperties(), op->getRegions()));
} else {
result = cast<ConcreteOpT>(op).fold(typename ConcreteOpT::FoldAdaptor(
- operands, op->getAttrDictionary(), {}, op->getRegions()));
+ operands, op->getDiscardableAttrDictionary(), {},
+ op->getRegions()));
}
} else {
result = cast<ConcreteOpT>(op).fold(operands);
@@ -1920,13 +1921,14 @@ private:
if constexpr (hasProperties()) {
result = cast<ConcreteOpT>(op).fold(
typename ConcreteOpT::FoldAdaptor(
- operands, op->getAttrDictionary(),
+ operands, op->getDiscardableAttrDictionary(),
cast<ConcreteOpT>(op).getProperties(), op->getRegions()),
results);
} else {
result = cast<ConcreteOpT>(op).fold(
- typename ConcreteOpT::FoldAdaptor(operands, op->getAttrDictionary(),
- {}, op->getRegions()),
+ typename ConcreteOpT::FoldAdaptor(
+ operands, op->getDiscardableAttrDictionary(), {},
+ op->getRegions()),
results);
}
} else {