Skip to content

Commit 5382d28

Browse files
[mlir] Use std::optional instead of llvm::Optional (NFC)
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
1 parent 4305925 commit 5382d28

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include "mlir/Dialect/Vector/Transforms/VectorTransforms.h"
1414

15+
#include <optional>
1516
#include <type_traits>
1617

1718
#include "mlir/Dialect/Affine/IR/AffineOps.h"
@@ -150,7 +151,8 @@ static SmallVector<IntType> extractVector(ArrayAttr arrayAttr) {
150151
static std::optional<Value>
151152
createContractArithOp(Location loc, Value x, Value y, Value acc,
152153
vector::CombiningKind kind, PatternRewriter &rewriter,
153-
bool isInt, Optional<Value> maybeMask = std::nullopt) {
154+
bool isInt,
155+
std::optional<Value> maybeMask = std::nullopt) {
154156
using vector::CombiningKind;
155157
Value mul;
156158

@@ -1584,7 +1586,7 @@ struct UnrolledOuterProductGenerator
15841586
}
15851587

15861588
FailureOr<Value> outerProd(Value lhs, Value rhs, Value res, int reductionSize,
1587-
Optional<Value> maybeMask = std::nullopt) {
1589+
std::optional<Value> maybeMask = std::nullopt) {
15881590
assert(reductionSize > 0);
15891591
// Incremental support for masking.
15901592
if (mask && !maybeMask.has_value())

0 commit comments

Comments
 (0)