diff options
author | Kazu Hirata <kazu@google.com> | 2022-12-02 21:11:37 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-12-02 21:11:37 -0800 |
commit | 343de6856e16b58bcbd16d479fc633f54e22fadc (patch) | |
tree | 31e3fbef03aa0e4c5ea9582d0eacc650aba3073d /llvm/lib/Transforms/Scalar/LoopFuse.cpp | |
parent | 998960ee1f2c8bc3830df4849ab89ec9d6217f26 (diff) | |
download | llvm-343de6856e16b58bcbd16d479fc633f54e22fadc.zip llvm-343de6856e16b58bcbd16d479fc633f54e22fadc.tar.gz llvm-343de6856e16b58bcbd16d479fc633f54e22fadc.tar.bz2 |
[Transforms] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopFuse.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopFuse.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopFuse.cpp b/llvm/lib/Transforms/Scalar/LoopFuse.cpp index 70903f5..5f64260 100644 --- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp +++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp @@ -645,7 +645,7 @@ private: void collectFusionCandidates(const LoopVector &LV) { for (Loop *L : LV) { TTI::PeelingPreferences PP = - gatherPeelingPreferences(L, SE, TTI, None, None); + gatherPeelingPreferences(L, SE, TTI, std::nullopt, std::nullopt); FusionCandidate CurrCand(L, DT, &PDT, ORE, PP); if (!CurrCand.isEligibleForFusion(SE)) continue; @@ -708,14 +708,14 @@ private: if (isa<SCEVCouldNotCompute>(TripCount0)) { UncomputableTripCount++; LLVM_DEBUG(dbgs() << "Trip count of first loop could not be computed!"); - return {false, None}; + return {false, std::nullopt}; } const SCEV *TripCount1 = SE.getBackedgeTakenCount(FC1.L); if (isa<SCEVCouldNotCompute>(TripCount1)) { UncomputableTripCount++; LLVM_DEBUG(dbgs() << "Trip count of second loop could not be computed!"); - return {false, None}; + return {false, std::nullopt}; } LLVM_DEBUG(dbgs() << "\tTrip counts: " << *TripCount0 << " & " @@ -740,7 +740,7 @@ private: LLVM_DEBUG(dbgs() << "Loop(s) do not have a single exit point or do not " "have a constant number of iterations. Peeling " "is not benefical\n"); - return {false, None}; + return {false, std::nullopt}; } Optional<unsigned> Difference; |