[llvm] 7fc772b - [Scalar] Use std::optional in InductiveRangeCheckElimination.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 23:59:50 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T23:59:45-08:00
New Revision: 7fc772bbdc34ced480bef9aa6043f8e0980bb522
URL: https://github.com/llvm/llvm-project/commit/7fc772bbdc34ced480bef9aa6043f8e0980bb522
DIFF: https://github.com/llvm/llvm-project/commit/7fc772bbdc34ced480bef9aa6043f8e0980bb522.diff
LOG: [Scalar] Use std::optional in InductiveRangeCheckElimination.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/Transforms/Scalar/InductiveRangeCheckElimination.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
index 15a0e938c8ea..b50d197b5a30 100644
--- a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
@@ -93,6 +93,7 @@
#include <cassert>
#include <iterator>
#include <limits>
+#include <optional>
#include <utility>
#include <vector>
@@ -547,8 +548,8 @@ class LoopConstrainer {
// space of the main loop.
struct SubRanges {
- Optional<const SCEV *> LowLimit;
- Optional<const SCEV *> HighLimit;
+ std::optional<const SCEV *> LowLimit;
+ std::optional<const SCEV *> HighLimit;
};
// Compute a safe set of limits for the main loop to run in -- effectively the
More information about the llvm-commits
mailing list