aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ModuloSchedule.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-12-04 22:43:14 +0000
committerFangrui Song <i@maskray.me>2022-12-04 22:43:14 +0000
commitb0df70403d20e8aad5eb1abe147441d8763f333b (patch)
treebd24394ccb3916123680926f8305dcd633f82f93 /llvm/lib/CodeGen/ModuloSchedule.cpp
parent7f773ce6fc98a31b3466be02c020439414c2da24 (diff)
downloadllvm-b0df70403d20e8aad5eb1abe147441d8763f333b.zip
llvm-b0df70403d20e8aad5eb1abe147441d8763f333b.tar.gz
llvm-b0df70403d20e8aad5eb1abe147441d8763f333b.tar.bz2
[Target] llvm::Optional => std::optional
The updated functions are mostly internal with a few exceptions (virtual functions in TargetInstrInfo.h, TargetRegisterInfo.h). To minimize changes to LLVMCodeGen, GlobalISel files are skipped. https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
-rw-r--r--llvm/lib/CodeGen/ModuloSchedule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ModuloSchedule.cpp b/llvm/lib/CodeGen/ModuloSchedule.cpp
index c7fde45..195fd45 100644
--- a/llvm/lib/CodeGen/ModuloSchedule.cpp
+++ b/llvm/lib/CodeGen/ModuloSchedule.cpp
@@ -880,7 +880,7 @@ void ModuloScheduleExpander::addBranches(MachineBasicBlock &PreheaderBB,
MachineBasicBlock *Epilog = EpilogBBs[i];
SmallVector<MachineOperand, 4> Cond;
- Optional<bool> StaticallyGreater =
+ std::optional<bool> StaticallyGreater =
LoopInfo->createTripCountGreaterCondition(j + 1, *Prolog, Cond);
unsigned numAdded = 0;
if (!StaticallyGreater) {
@@ -1963,7 +1963,7 @@ void PeelingModuloScheduleExpander::fixupBranches() {
MachineBasicBlock *Epilog = *EI;
SmallVector<MachineOperand, 4> Cond;
TII->removeBranch(*Prolog);
- Optional<bool> StaticallyGreater =
+ std::optional<bool> StaticallyGreater =
LoopInfo->createTripCountGreaterCondition(TC, *Prolog, Cond);
if (!StaticallyGreater) {
LLVM_DEBUG(dbgs() << "Dynamic: TC > " << TC << "\n");