diff options
Diffstat (limited to 'llvm/lib/Analysis/LoopNestAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopNestAnalysis.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/LoopNestAnalysis.cpp b/llvm/lib/Analysis/LoopNestAnalysis.cpp index bff796f339ab..fe6d270b9ac5 100644 --- a/llvm/lib/Analysis/LoopNestAnalysis.cpp +++ b/llvm/lib/Analysis/LoopNestAnalysis.cpp @@ -84,7 +84,7 @@ static CmpInst *getInnerLoopGuardCmp(const Loop &InnerLoop) { static bool checkSafeInstruction(const Instruction &I, const CmpInst *InnerLoopGuardCmp, const CmpInst *OuterLoopLatchCmp, - Optional<Loop::LoopBounds> OuterLoopLB) { + std::optional<Loop::LoopBounds> OuterLoopLB) { bool IsAllowed = isSafeToSpeculativelyExecute(&I) || isa<PHINode>(I) || isa<BranchInst>(I); @@ -128,7 +128,7 @@ LoopNest::LoopNestEnum LoopNest::analyzeLoopNestForPerfectNest( // Bail out if we cannot retrieve the outer loop bounds. auto OuterLoopLB = OuterLoop.getBounds(SE); - if (OuterLoopLB == None) { + if (OuterLoopLB == std::nullopt) { LLVM_DEBUG(dbgs() << "Cannot compute loop bounds of OuterLoop: " << OuterLoop << "\n";); return OuterLoopLowerBoundUnknown; @@ -295,7 +295,7 @@ const BasicBlock &LoopNest::skipEmptyBlockUntil(const BasicBlock *From, return *From; auto IsEmpty = [](const BasicBlock *BB) { - return (BB->getInstList().size() == 1); + return (BB->size() == 1); }; // Visited is used to avoid running into an infinite loop. @@ -379,7 +379,7 @@ static bool checkLoopsStructure(const Loop &OuterLoop, const Loop &InnerLoop, // Ensure the inner loop guard successor is empty before skipping // blocks. - if (Succ->getInstList().size() == 1) { + if (Succ->size() == 1) { PotentialInnerPreHeader = &LoopNest::skipEmptyBlockUntil(Succ, InnerLoopPreHeader); PotentialOuterLatch = |