[Mlir-commits] [mlir] 5382d28 - [mlir] Use std::optional instead of llvm::Optional (NFC)
Kazu Hirata
llvmlistbot at llvm.org
Wed Feb 15 19:40:15 PST 2023
Author: Kazu Hirata
Date: 2023-02-15T19:40:10-08:00
New Revision: 5382d28815d8a2e328aa1b2d77595a2d52c91ac1
URL: https://github.com/llvm/llvm-project/commit/5382d28815d8a2e328aa1b2d77595a2d52c91ac1
DIFF: https://github.com/llvm/llvm-project/commit/5382d28815d8a2e328aa1b2d77595a2d52c91ac1.diff
LOG: [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
Added:
Modified:
mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
index 9976cf79fb8e2..357582b4052d9 100644
--- a/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
+++ b/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
@@ -12,6 +12,7 @@
#include "mlir/Dialect/Vector/Transforms/VectorTransforms.h"
+#include <optional>
#include <type_traits>
#include "mlir/Dialect/Affine/IR/AffineOps.h"
@@ -150,7 +151,8 @@ static SmallVector<IntType> extractVector(ArrayAttr arrayAttr) {
static std::optional<Value>
createContractArithOp(Location loc, Value x, Value y, Value acc,
vector::CombiningKind kind, PatternRewriter &rewriter,
- bool isInt, Optional<Value> maybeMask = std::nullopt) {
+ bool isInt,
+ std::optional<Value> maybeMask = std::nullopt) {
using vector::CombiningKind;
Value mul;
@@ -1584,7 +1586,7 @@ struct UnrolledOuterProductGenerator
}
FailureOr<Value> outerProd(Value lhs, Value rhs, Value res, int reductionSize,
- Optional<Value> maybeMask = std::nullopt) {
+ std::optional<Value> maybeMask = std::nullopt) {
assert(reductionSize > 0);
// Incremental support for masking.
if (mask && !maybeMask.has_value())
More information about the Mlir-commits
mailing list