diff --git a/libcxx/include/cmath b/libcxx/include/cmath index 0f06486fb34f3e..0901a23a2498d9 100644 --- a/libcxx/include/cmath +++ b/libcxx/include/cmath @@ -296,6 +296,10 @@ floating_point trunc (arithmetic x); float truncf(float x); long double truncl(long double x); +constexpr float lerp(float a, float b, float t) noexcept; // C++20 +constexpr double lerp(double a, double b, double t) noexcept; // C++20 +constexpr long double lerp(long double a, long double b, long double t) noexcept; // C++20 + } // std */ diff --git a/libcxx/test/std/numerics/c.math/c.math.lerp/c.math.lerp.pass.cpp b/libcxx/test/std/numerics/c.math/c.math.lerp/c.math.lerp.pass.cpp index 7d9ceef8b48e82..6eeeec4898d64c 100644 --- a/libcxx/test/std/numerics/c.math/c.math.lerp/c.math.lerp.pass.cpp +++ b/libcxx/test/std/numerics/c.math/c.math.lerp/c.math.lerp.pass.cpp @@ -8,10 +8,9 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // -// constexpr float lerp(float a, float b, float t); -// constexpr double lerp(double a, double b, double t); -// constexpr long double lerp(long double a, long double b, long double t); - +// constexpr float lerp(float a, float b, float t) noexcept; +// constexpr double lerp(double a, double b, double t) noexcept; +// constexpr long double lerp(long double a, long double b, long double t) noexcept; #include #include diff --git a/libcxx/www/cxx2a_status.html b/libcxx/www/cxx2a_status.html index 2a93d35feb50f8..6214dd2cdd8380 100644 --- a/libcxx/www/cxx2a_status.html +++ b/libcxx/www/cxx2a_status.html @@ -477,7 +477,7 @@

Library Working group Issues Status

3175The CommonReference requirement of concept SwappableWith is not satisfied in the examplePrague 3194ConvertibleTo prose does not match codePrague 3200midpoint should not constrain T is completePrague - 3201lerp should be marked as noexceptPrague + 3201lerp should be marked as noexceptPragueComplete 3226zoned_time constructor from string_view should accept zoned_time<Duration2, TimeZonePtr2>Prague 3233Broken requirements for shared_ptr converting constructorsPrague 3237LWG 3038 and 3190 have inconsistent PRsPrague diff --git a/llvm/include/llvm/Transforms/Utils/CallGraphUpdater.h b/llvm/include/llvm/Transforms/Utils/CallGraphUpdater.h index 6103859ca959a3..22954b469186c5 100644 --- a/llvm/include/llvm/Transforms/Utils/CallGraphUpdater.h +++ b/llvm/include/llvm/Transforms/Utils/CallGraphUpdater.h @@ -28,7 +28,7 @@ namespace llvm { class CallGraphUpdater { /// Containers for functions which we did replace or want to delete when /// `finalize` is called. This can happen explicitly or as part of the - /// destructor. Dead functions in comdat sections are tracked seperatly + /// destructor. Dead functions in comdat sections are tracked separately /// because a function with discardable linakage in a COMDAT should only /// be dropped if the entire COMDAT is dropped, see git ac07703842cf. ///{ diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp index 6b3876ed91aae8..f641ad4498cd1b 100644 --- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp +++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp @@ -54,7 +54,7 @@ STATISTIC(NumAAs, "Number of abstract attributes created"); // } // If there is a single "increment" side one can use the macro // STATS_DECLTRACK with a custom message. If there are multiple increment -// sides, STATS_DECL and STATS_TRACK can also be used separatly. +// sides, STATS_DECL and STATS_TRACK can also be used separately. // #define BUILD_STAT_MSG_IR_ATTR(TYPE, NAME) \ ("Number of " #TYPE " marked '" #NAME "'") diff --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp index dd66c6703ba09b..63eddbda94e73b 100644 --- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp +++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp @@ -224,7 +224,7 @@ struct OpenMPOpt { OMPRTL_omp_get_partition_num_places, OMPRTL_omp_get_partition_place_nums}; - // Global-tid is handled separatly. + // Global-tid is handled separately. SmallSetVector GTIdArgs; collectGlobalThreadIdArguments(GTIdArgs); LLVM_DEBUG(dbgs() << TAG << "Found " << GTIdArgs.size() @@ -556,7 +556,7 @@ struct OpenMPOpt { auto &ORE = OREGetter(F); ORE.emit([&]() { - return RemarkCB(RemarkKind(DEBUG_TYPE, RemarkName, Inst)); + return RemarkCB(RemarkKind(DEBUG_TYPE, RemarkName, Inst)); }); } diff --git a/llvm/lib/Transforms/Instrumentation/PoisonChecking.cpp b/llvm/lib/Transforms/Instrumentation/PoisonChecking.cpp index e5c338fed9523f..85e096112fca12 100644 --- a/llvm/lib/Transforms/Instrumentation/PoisonChecking.cpp +++ b/llvm/lib/Transforms/Instrumentation/PoisonChecking.cpp @@ -190,7 +190,7 @@ static void generateCreationChecks(Instruction &I, if (isa(I) && !I.getType()->isVectorTy()) generateCreationChecksForBinOp(I, Checks); - // Handle non-binops seperately + // Handle non-binops separately switch (I.getOpcode()) { default: // Note there are a couple of missing cases here, once implemented, this diff --git a/llvm/lib/Transforms/Scalar/LoopPredication.cpp b/llvm/lib/Transforms/Scalar/LoopPredication.cpp index 1d73a9f24453ab..edde22d6708fed 100644 --- a/llvm/lib/Transforms/Scalar/LoopPredication.cpp +++ b/llvm/lib/Transforms/Scalar/LoopPredication.cpp @@ -268,7 +268,7 @@ class LoopPredication { /// Return an insertion point suitable for inserting a safe to speculate /// instruction whose only user will be 'User' which has operands 'Ops'. A /// trivial result would be the at the User itself, but we try to return a - /// loop invariant location if possible. + /// loop invariant location if possible. Instruction *findInsertPt(Instruction *User, ArrayRef Ops); /// Same as above, *except* that this uses the SCEV definition of invariant /// which is that an expression *can be made* invariant via SCEVExpander. @@ -278,7 +278,7 @@ class LoopPredication { /// Return true if the value is known to produce a single fixed value across /// all iterations on which it executes. Note that this does not imply - /// speculation safety. That must be established seperately. + /// speculation safety. That must be established separately. bool isLoopInvariantValue(const SCEV* S); Value *expandCheck(SCEVExpander &Expander, Instruction *Guard, @@ -398,7 +398,7 @@ LoopPredication::parseLoopICmp(ICmpInst *ICI) { } Value *LoopPredication::expandCheck(SCEVExpander &Expander, - Instruction *Guard, + Instruction *Guard, ICmpInst::Predicate Pred, const SCEV *LHS, const SCEV *RHS) { Type *Ty = LHS->getType(); @@ -522,7 +522,7 @@ Instruction *LoopPredication::findInsertPt(Instruction *Use, return Preheader->getTerminator(); } -bool LoopPredication::isLoopInvariantValue(const SCEV* S) { +bool LoopPredication::isLoopInvariantValue(const SCEV* S) { // Handling expressions which produce invariant results, but *haven't* yet // been removed from the loop serves two important purposes. // 1) Most importantly, it resolves a pass ordering cycle which would @@ -535,12 +535,12 @@ bool LoopPredication::isLoopInvariantValue(const SCEV* S) { // much more obviously in the IR. Otherwise, the cost modeling for other // transforms would end up needing to duplicate all of this logic to model a // check which becomes predictable based on a modeled peel or unswitch. - // + // // The cost of doing so in the worst case is an extra fill from the stack in // the loop to materialize the loop invariant test value instead of checking // against the original IV which is presumable in a register inside the loop. // Such cases are presumably rare, and hint at missing oppurtunities for - // other passes. + // other passes. if (SE->isLoopInvariant(S, L)) // Note: This the SCEV variant, so the original Value* may be within the @@ -548,7 +548,7 @@ bool LoopPredication::isLoopInvariantValue(const SCEV* S) { return true; // Handle a particular important case which SCEV doesn't yet know about which - // shows up in range checks on arrays with immutable lengths. + // shows up in range checks on arrays with immutable lengths. // TODO: This should be sunk inside SCEV. if (const SCEVUnknown *U = dyn_cast(S)) if (const auto *LI = dyn_cast(U->getValue())) @@ -575,7 +575,7 @@ Optional LoopPredication::widenICmpRangeCheckIncrementingLoop( const SCEV *LatchLimit = LatchCheck.Limit; // Subtlety: We need all the values to be *invariant* across all iterations, // but we only need to check expansion safety for those which *aren't* - // already guaranteed to dominate the guard. + // already guaranteed to dominate the guard. if (!isLoopInvariantValue(GuardStart) || !isLoopInvariantValue(GuardLimit) || !isLoopInvariantValue(LatchStart) || @@ -599,7 +599,7 @@ Optional LoopPredication::widenICmpRangeCheckIncrementingLoop( LLVM_DEBUG(dbgs() << "LHS: " << *LatchLimit << "\n"); LLVM_DEBUG(dbgs() << "RHS: " << *RHS << "\n"); LLVM_DEBUG(dbgs() << "Pred: " << LimitCheckPred << "\n"); - + auto *LimitCheck = expandCheck(Expander, Guard, LimitCheckPred, LatchLimit, RHS); auto *FirstIterationCheck = expandCheck(Expander, Guard, RangeCheck.Pred, @@ -618,7 +618,7 @@ Optional LoopPredication::widenICmpRangeCheckDecrementingLoop( const SCEV *LatchLimit = LatchCheck.Limit; // Subtlety: We need all the values to be *invariant* across all iterations, // but we only need to check expansion safety for those which *aren't* - // already guaranteed to dominate the guard. + // already guaranteed to dominate the guard. if (!isLoopInvariantValue(GuardStart) || !isLoopInvariantValue(GuardLimit) || !isLoopInvariantValue(LatchStart) || @@ -659,7 +659,7 @@ Optional LoopPredication::widenICmpRangeCheckDecrementingLoop( static void normalizePredicate(ScalarEvolution *SE, Loop *L, LoopICmp& RC) { // LFTR canonicalizes checks to the ICMP_NE/EQ form; normalize back to the - // ULT/UGE form for ease of handling by our caller. + // ULT/UGE form for ease of handling by our caller. if (ICmpInst::isEquality(RC.Pred) && RC.IV->getStepRecurrence(*SE)->isOne() && SE->isKnownPredicate(ICmpInst::ICMP_ULE, RC.IV->getStart(), RC.Limit)) @@ -1044,7 +1044,7 @@ bool LoopPredication::predicateLoopExits(Loop *L, SCEVExpander &Rewriter) { // inserting a branch on the value which can be either poison or undef. In // this case, the branch can legally go either way; we just need to avoid // introducing UB. This is achieved through the use of the freeze - // instruction. + // instruction. SmallVector ExitingBlocks; L->getExitingBlocks(ExitingBlocks); @@ -1072,7 +1072,7 @@ bool LoopPredication::predicateLoopExits(Loop *L, SCEVExpander &Rewriter) { // analyzeable after dropping widenability. { bool Invalidate = false; - + for (auto *ExitingBB : ExitingBlocks) { if (LI->getLoopFor(ExitingBB) != L) continue; diff --git a/llvm/lib/Transforms/Utils/LoopUnroll.cpp b/llvm/lib/Transforms/Utils/LoopUnroll.cpp index c0177bdb3f6fa6..23b61c40a75676 100644 --- a/llvm/lib/Transforms/Utils/LoopUnroll.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnroll.cpp @@ -717,7 +717,6 @@ LoopUnrollResult llvm::UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI, } auto setDest = [LoopExit, ContinueOnTrue](BasicBlock *Src, BasicBlock *Dest, - ArrayRef NextBlocks, BasicBlock *BlockInLoop, bool NeedConditional) { auto *Term = cast(Src->getTerminator()); @@ -779,7 +778,7 @@ LoopUnrollResult llvm::UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI, NeedConditional = false; } - setDest(Latches[i], Dest, Headers, Headers[i], NeedConditional); + setDest(Latches[i], Dest, Headers[i], NeedConditional); } } else { // Setup headers to branch to their new successors in the unrolled @@ -803,7 +802,7 @@ LoopUnrollResult llvm::UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI, // unconditional branch for some iterations. NeedConditional = false; - setDest(Headers[i], Dest, Headers, HeaderSucc[i], NeedConditional); + setDest(Headers[i], Dest, HeaderSucc[i], NeedConditional); } // Set up latches to branch to the new header in the unrolled iterations or diff --git a/llvm/test/Transforms/RewriteStatepointsForGC/preprocess.ll b/llvm/test/Transforms/RewriteStatepointsForGC/preprocess.ll index 105e0e88ac215e..6e03798b1d2a6b 100644 --- a/llvm/test/Transforms/RewriteStatepointsForGC/preprocess.ll +++ b/llvm/test/Transforms/RewriteStatepointsForGC/preprocess.ll @@ -29,7 +29,7 @@ next: ; preds = %entry define void @test7() gc "statepoint-example" { ; CHECK-LABEL: test7 ; CHECK-NOT: gc.statepoint -; Need to delete unreachable gc.statepoint invoke - tested seperately given +; Need to delete unreachable gc.statepoint invoke - tested separately given ; a correct implementation could only remove the instructions, not the block ret void