[llvm] 02e9de3 - [Analysis] Use std::optional in LoopAccessAnalysis.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 12:18:40 PST 2022
Author: Kazu Hirata
Date: 2022-11-27T12:18:13-08:00
New Revision: 02e9de378155d2b91149546f09ff08d9385c1575
URL: https://github.com/llvm/llvm-project/commit/02e9de378155d2b91149546f09ff08d9385c1575
DIFF: https://github.com/llvm/llvm-project/commit/02e9de378155d2b91149546f09ff08d9385c1575.diff
LOG: [Analysis] Use std::optional in LoopAccessAnalysis.h (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/include/llvm/Analysis/LoopAccessAnalysis.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
index a863640f59ac..9a3c06bb8da2 100644
--- a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
+++ b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
@@ -19,6 +19,7 @@
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/Pass.h"
+#include <optional>
namespace llvm {
@@ -452,7 +453,7 @@ class RuntimePointerChecking {
// dependencies at runtime. There are is a vectorization-preventing dependency
// if any pointer-
diff erence is <u VF * InterleaveCount * access size. Returns
// None if pointer-
diff erence checks cannot be used.
- Optional<ArrayRef<PointerDiffInfo>> getDiffChecks() const {
+ std::optional<ArrayRef<PointerDiffInfo>> getDiffChecks() const {
if (!CanUseDiffCheck)
return None;
return {DiffChecks};
More information about the llvm-commits
mailing list