[llvm] 298cb55 - [AArch64] Use std::optional in AArch64LoadStoreOptimizer.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 22:08:36 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T22:08:30-08:00
New Revision: 298cb551fb399d71d65a1ee3c3dd791f79e2e925
URL: https://github.com/llvm/llvm-project/commit/298cb551fb399d71d65a1ee3c3dd791f79e2e925
DIFF: https://github.com/llvm/llvm-project/commit/298cb551fb399d71d65a1ee3c3dd791f79e2e925.diff
LOG: [AArch64] Use std::optional in AArch64LoadStoreOptimizer.cpp (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:
llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
index 094e7ac5cda7..3b0024e2d39c 100644
--- a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
@@ -50,6 +50,7 @@
#include <functional>
#include <iterator>
#include <limits>
+#include <optional>
using namespace llvm;
@@ -1531,7 +1532,7 @@ AArch64LoadStoreOpt::findMatchingInsn(MachineBasicBlock::iterator I,
int OffsetStride = IsUnscaled ? TII->getMemScale(FirstMI) : 1;
bool IsPromotableZeroStore = isPromotableZeroStoreInst(FirstMI);
- Optional<bool> MaybeCanRename;
+ std::optional<bool> MaybeCanRename;
if (!EnableRenaming)
MaybeCanRename = {false};
More information about the llvm-commits
mailing list