diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp index 74e6adf..35494e8 100644 --- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp @@ -63,6 +63,7 @@ #include <cassert> #include <iterator> #include <numeric> +#include <optional> #include <utility> #define DEBUG_TYPE "simple-loop-unswitch" @@ -2988,7 +2989,7 @@ static NonTrivialUnswitchCandidate findBestNonTrivialUnswitchCandidate( return (LoopCost - Cost) * (SuccessorsCount - 1); }; - Optional<NonTrivialUnswitchCandidate> Best; + std::optional<NonTrivialUnswitchCandidate> Best; for (auto &Candidate : UnswitchCandidates) { Instruction &TI = *Candidate.TI; ArrayRef<Value *> Invariants = Candidate.Invariants; @@ -3210,7 +3211,7 @@ PreservedAnalyses SimpleLoopUnswitchPass::run(Loop &L, LoopAnalysisManager &AM, U.markLoopAsDeleted(L, Name); }; - Optional<MemorySSAUpdater> MSSAU; + std::optional<MemorySSAUpdater> MSSAU; if (AR.MSSA) { MSSAU = MemorySSAUpdater(AR.MSSA); if (VerifyMemorySSA) |