diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-04-14 21:41:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-06-22 18:20:56 +0000 |
commit | bdd1243df58e60e85101c09001d9812a789b6bc4 (patch) | |
tree | a1ce621c7301dd47ba2ddc3b8eaa63b441389481 /contrib/llvm-project/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp | |
parent | 781624ca2d054430052c828ba8d2c2eaf2d733e7 (diff) | |
parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/contrib/llvm-project/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp index c569f0350366..b1cbe525d7e6 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp @@ -12,7 +12,6 @@ #include "llvm/CodeGen/MachineBlockFrequencyInfo.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/None.h" #include "llvm/ADT/iterator.h" #include "llvm/Analysis/BlockFrequencyInfoImpl.h" #include "llvm/CodeGen/MachineBasicBlock.h" @@ -23,6 +22,7 @@ #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/GraphWriter.h" +#include <optional> #include <string> using namespace llvm; @@ -231,19 +231,19 @@ MachineBlockFrequencyInfo::getBlockFreq(const MachineBasicBlock *MBB) const { return MBFI ? MBFI->getBlockFreq(MBB) : 0; } -Optional<uint64_t> MachineBlockFrequencyInfo::getBlockProfileCount( +std::optional<uint64_t> MachineBlockFrequencyInfo::getBlockProfileCount( const MachineBasicBlock *MBB) const { if (!MBFI) - return None; + return std::nullopt; const Function &F = MBFI->getFunction()->getFunction(); return MBFI->getBlockProfileCount(F, MBB); } -Optional<uint64_t> +std::optional<uint64_t> MachineBlockFrequencyInfo::getProfileCountFromFreq(uint64_t Freq) const { if (!MBFI) - return None; + return std::nullopt; const Function &F = MBFI->getFunction()->getFunction(); return MBFI->getProfileCountFromFreq(F, Freq); |