diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index b69735a..9ada3a2d 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -258,7 +258,7 @@ llvm::getOptionalElementCountLoopAttribute(const Loop *TheLoop) { return ElementCount::get(*Width, IsScalable.value_or(false)); } - return None; + return std::nullopt; } Optional<MDNode *> llvm::makeFollowupLoopID( @@ -267,7 +267,7 @@ Optional<MDNode *> llvm::makeFollowupLoopID( if (!OrigLoopID) { if (AlwaysNew) return nullptr; - return None; + return std::nullopt; } assert(OrigLoopID->getOperand(0) == OrigLoopID); @@ -326,7 +326,7 @@ Optional<MDNode *> llvm::makeFollowupLoopID( // Attributes of the followup loop not specified explicity, so signal to the // transformation pass to add suitable attributes. if (!AlwaysNew && !HasAnyFollowup) - return None; + return std::nullopt; // If no attributes were added or remove, the previous loop Id can be reused. if (!AlwaysNew && !Changed) @@ -790,14 +790,14 @@ getEstimatedTripCount(BranchInst *ExitingBranch, Loop *L, // we exited the loop. uint64_t LoopWeight, ExitWeight; if (!extractBranchWeights(*ExitingBranch, LoopWeight, ExitWeight)) - return None; + return std::nullopt; if (L->contains(ExitingBranch->getSuccessor(1))) std::swap(LoopWeight, ExitWeight); if (!ExitWeight) // Don't have a way to return predicated infinite - return None; + return std::nullopt; OrigExitWeight = ExitWeight; @@ -824,7 +824,7 @@ llvm::getLoopEstimatedTripCount(Loop *L, return *EstTripCount; } } - return None; + return std::nullopt; } bool llvm::setLoopEstimatedTripCount(Loop *L, unsigned EstimatedTripCount, |