From nobody Sun Jul 23 18:27:07 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R8BbJ3jwtz4p6KQ; Sun, 23 Jul 2023 18:27:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R8BbJ0CrMz3h6Z; Sun, 23 Jul 2023 18:27:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690136828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y2xXZ1ZQpGQ1NEVJIxy4NtdJZcrVNMOlDLanh8FSjEY=; b=HgrYAAOyy4w89WKN+Tz+mMpzHXOPAo4bh3vKFSNKqCxpexsX5Ii64suGEA+T8vaBbmqO1q I4gYT1EjXKgopN1+gXWu+n7DemA9WP12PgaJF0ZsADlMHlr7m1NWYIPkjxWKOjlCj5LIj6 Iy9Il7M0ccUbHPIkBpjlEC+TOpBABgRFKE+AEqPJDh3x9hqmwyC4a3sqWXU3IC7SedI3WH BxFuDA//ZmdzCIrYabTZcjSHHbB6itqH0WUwegolNbHlevuwzvnIVPlfasBQBKXFm6v7cs p5oysI0VRXDhrCvJ8wSqYyqgAo3cA8B0hb+7aALJorgJZnq5Agotb3a9hEaAjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690136828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y2xXZ1ZQpGQ1NEVJIxy4NtdJZcrVNMOlDLanh8FSjEY=; b=IlQXMcFW7Qbpj2e/XNqntHVQpIGJKDoUhnOo+UrETh87QL6D2qao8n79QGC+q+rGk4fmNY ft7Xb2eIoxcEWGSU8xLIhdzfSLN0zEie9mG1jArz0YkCWq/m73hwwfoOcQJwhMcDn0ADEz YDDDE93Uod7lhac/hvZPyHCB5GtpKPHlpDFwQDLimad9cUVLIYccbgqT7Vo1yPZbEQIWFx jHQL6vpAoj86NP2PSUeKpb0sCqmpldiwo61IAVzOOrJmNNkEgBIw3+Ofkk4VeKD9gQ6kPW oJRYywLrAN6oa5hELrqPnqg7Z4+uz9LOteZGPi6tqE1TMJNm2XsXBU8Z7LfdGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690136828; a=rsa-sha256; cv=none; b=csYnivm+9mIYfjHyw3+yXcwLJXLXJlkezUFKJG7rdYDjmIqFxiAlqZpmE5rB9Y7SnMco+a tvbTfRR6XIKrRbwSMQGzZ14pcdnUnHYUnP7lfgO1EhmRoP5cUJA0nVb+CTXJgMHOTugylX KIrOEVkkaal3TFfcXnpzQtKtUnok+v3+9qOBIx3NpsDLrd9fyZFrtxvcGO74n0cdXcniMX NEHewd6fVw14IygRcdugmPl4qF4KJ+sWtnagSeg+phLDzwfnfj5r+O235nU2sG5wLTSZsR OQW3he6pWp54/E9XZ5DiVZOdO/TWvmcZG/9bY6fmxT22Q9vV3zEwwXkq8OmRyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R8BbH6Qh9zmhh; Sun, 23 Jul 2023 18:27:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36NIR7GE058751; Sun, 23 Jul 2023 18:27:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36NIR7N3058750; Sun, 23 Jul 2023 18:27:07 GMT (envelope-from git) Date: Sun, 23 Jul 2023 18:27:07 GMT Message-Id: <202307231827.36NIR7N3058750@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: da3adc3ce965 - stable/13 - Merge llvm-project release/16.x llvmorg-16.0.3-0-gda3cd333bea5 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: da3adc3ce9654206cdd1f6a481e5f55d6f880bd3 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=da3adc3ce9654206cdd1f6a481e5f55d6f880bd3 commit da3adc3ce9654206cdd1f6a481e5f55d6f880bd3 Author: Dimitry Andric AuthorDate: 2023-05-05 17:37:33 +0000 Commit: Dimitry Andric CommitDate: 2023-07-23 17:38:10 +0000 Merge llvm-project release/16.x llvmorg-16.0.3-0-gda3cd333bea5 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-16.0.3-0-gda3cd333bea5 (aka 16.0.3 release). PR: 271047 MFC after: 1 month (cherry picked from commit cbe9438cfe07adfbcdeafe8e363614f83b03a055) --- contrib/llvm-project/clang/lib/AST/Expr.cpp | 4 +++ .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 7 ++++ contrib/llvm-project/clang/lib/Sema/SemaInit.cpp | 7 ++-- .../llvm-project/clang/lib/Sema/TreeTransform.h | 22 +++++------- contrib/llvm-project/libcxx/include/__config | 2 +- contrib/llvm-project/lld/COFF/Driver.cpp | 8 ++++- contrib/llvm-project/lld/COFF/Options.td | 3 ++ .../lldb/source/Host/posix/MainLoopPosix.cpp | 9 +++-- .../llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp | 3 +- .../InstCombine/InstCombineMulDivRem.cpp | 41 ++++++++++++++-------- .../llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 10 ++++-- lib/clang/include/VCSVersion.inc | 6 ++-- lib/clang/include/clang/Basic/Version.inc | 6 ++-- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 6 ++-- lib/clang/include/llvm/Config/config.h | 4 +-- lib/clang/include/llvm/Config/llvm-config.h | 4 +-- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- 18 files changed, 93 insertions(+), 53 deletions(-) diff --git a/contrib/llvm-project/clang/lib/AST/Expr.cpp b/contrib/llvm-project/clang/lib/AST/Expr.cpp index 67862a8692ac..e45ae68cd5fe 100644 --- a/contrib/llvm-project/clang/lib/AST/Expr.cpp +++ b/contrib/llvm-project/clang/lib/AST/Expr.cpp @@ -1963,6 +1963,10 @@ Expr *ignoreImplicitSemaNodes(Expr *E) { if (auto *Full = dyn_cast(E)) return Full->getSubExpr(); + if (auto *CPLIE = dyn_cast(E); + CPLIE && CPLIE->getInitExprs().size() == 1) + return CPLIE->getInitExprs()[0]; + return E; } } // namespace diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.cpp index 0883631dfe98..34640b3c450d 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -757,6 +757,13 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, D.Diag(clang::diag::warn_drv_fjmc_for_elf_only); } + if (Arg *A = Args.getLastArg(options::OPT_femulated_tls, + options::OPT_fno_emulated_tls)) { + bool Enable = A->getOption().getID() == options::OPT_femulated_tls; + CmdArgs.push_back(Args.MakeArgString( + Twine(PluginOptPrefix) + "-emulated-tls=" + (Enable ? "1" : "0"))); + } + if (Args.hasFlag(options::OPT_fstack_size_section, options::OPT_fno_stack_size_section, false)) CmdArgs.push_back( diff --git a/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp b/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp index ddb2b5cf5cd1..99801a88e3ed 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp @@ -5420,8 +5420,9 @@ static void TryOrBuildParenListInitialization( } else if (auto *RT = Entity.getType()->getAs()) { const CXXRecordDecl *RD = cast(RT->getDecl()); - auto BaseRange = map_range(RD->bases(), [&S](auto &base) { - return InitializedEntity::InitializeBase(S.getASTContext(), &base, false); + auto BaseRange = map_range(RD->bases(), [&](auto &base) { + return InitializedEntity::InitializeBase(S.getASTContext(), &base, false, + &Entity); }); auto FieldRange = map_range(RD->fields(), [](auto *field) { return InitializedEntity::InitializeMember(field); @@ -9180,6 +9181,8 @@ ExprResult InitializationSequence::Perform(Sema &S, /*VerifyOnly=*/false, &CurInit); if (CurInit.get() && ResultType) *ResultType = CurInit.get()->getType(); + if (shouldBindAsTemporary(Entity)) + CurInit = S.MaybeBindToTemporary(CurInit.get()); break; } } diff --git a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h index 48bb28b56cd3..4244bbc1e4b1 100644 --- a/contrib/llvm-project/clang/lib/Sema/TreeTransform.h +++ b/contrib/llvm-project/clang/lib/Sema/TreeTransform.h @@ -3137,6 +3137,13 @@ public: Expr *Sub, SourceLocation RParenLoc, bool ListInitialization) { + // If Sub is a ParenListExpr, then Sub is the syntatic form of a + // CXXParenListInitExpr. Pass its expanded arguments so that the + // CXXParenListInitExpr can be rebuilt. + if (auto *PLE = dyn_cast(Sub)) + return getSema().BuildCXXTypeConstructExpr( + TInfo, LParenLoc, MultiExprArg(PLE->getExprs(), PLE->getNumExprs()), + RParenLoc, ListInitialization); return getSema().BuildCXXTypeConstructExpr(TInfo, LParenLoc, MultiExprArg(&Sub, 1), RParenLoc, ListInitialization); @@ -3866,16 +3873,6 @@ public: return getSema().BuildEmptyCXXFoldExpr(EllipsisLoc, Operator); } - ExprResult RebuildCXXParenListInitExpr(ArrayRef Args, QualType T, - unsigned NumUserSpecifiedExprs, - SourceLocation InitLoc, - SourceLocation LParenLoc, - SourceLocation RParenLoc) { - return CXXParenListInitExpr::Create(getSema().Context, Args, T, - NumUserSpecifiedExprs, InitLoc, - LParenLoc, RParenLoc); - } - /// Build a new atomic operation expression. /// /// By default, performs semantic analysis to build the new expression. @@ -14075,9 +14072,8 @@ TreeTransform::TransformCXXParenListInitExpr(CXXParenListInitExpr *E) { TransformedInits)) return ExprError(); - return getDerived().RebuildCXXParenListInitExpr( - TransformedInits, E->getType(), E->getUserSpecifiedInitExprs().size(), - E->getInitLoc(), E->getBeginLoc(), E->getEndLoc()); + return getDerived().RebuildParenListExpr(E->getBeginLoc(), TransformedInits, + E->getEndLoc()); } template diff --git a/contrib/llvm-project/libcxx/include/__config b/contrib/llvm-project/libcxx/include/__config index 5e30a42174af..36bdbd8680db 100644 --- a/contrib/llvm-project/libcxx/include/__config +++ b/contrib/llvm-project/libcxx/include/__config @@ -38,7 +38,7 @@ // _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM. // Given a LLVM release LLVM XX.YY.ZZ (e.g. LLVM 16.0.1 == 16.00.01), _LIBCPP_VERSION is // defined to XXYYZZ. -# define _LIBCPP_VERSION 160002 +# define _LIBCPP_VERSION 160003 # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) diff --git a/contrib/llvm-project/lld/COFF/Driver.cpp b/contrib/llvm-project/lld/COFF/Driver.cpp index 0a153c8f6cb7..d6b71eaf7f28 100644 --- a/contrib/llvm-project/lld/COFF/Driver.cpp +++ b/contrib/llvm-project/lld/COFF/Driver.cpp @@ -436,9 +436,12 @@ void LinkerDriver::parseDirectives(InputFile *file) { case OPT_editandcontinue: case OPT_guardsym: case OPT_throwingnew: + case OPT_inferasanlibs: + case OPT_inferasanlibs_no: break; default: - error(arg->getSpelling() + " is not allowed in .drectve"); + error(arg->getSpelling() + " is not allowed in .drectve (" + + toString(file) + ")"); } } } @@ -1923,6 +1926,9 @@ void LinkerDriver::linkerMain(ArrayRef argsArr) { args.hasFlag(OPT_stdcall_fixup, OPT_stdcall_fixup_no, config->mingw); config->warnStdcallFixup = !args.hasArg(OPT_stdcall_fixup); + if (args.hasFlag(OPT_inferasanlibs, OPT_inferasanlibs_no, false)) + warn("ignoring '/inferasanlibs', this flag is not supported"); + // Don't warn about long section names, such as .debug_info, for mingw or // when -debug:dwarf is requested. if (config->mingw || config->debugDwarf) diff --git a/contrib/llvm-project/lld/COFF/Options.td b/contrib/llvm-project/lld/COFF/Options.td index df527bb48ae7..2a89509be5fe 100644 --- a/contrib/llvm-project/lld/COFF/Options.td +++ b/contrib/llvm-project/lld/COFF/Options.td @@ -194,6 +194,9 @@ defm highentropyva : B<"highentropyva", defm incremental : B<"incremental", "Keep original import library if contents are unchanged", "Overwrite import library even if contents are unchanged">; +defm inferasanlibs : B<"inferasanlibs", + "Unused, generates a warning", + "No effect (default)">; defm integritycheck : B<"integritycheck", "Set FORCE_INTEGRITY bit in PE header", "No effect (default)">; diff --git a/contrib/llvm-project/lldb/source/Host/posix/MainLoopPosix.cpp b/contrib/llvm-project/lldb/source/Host/posix/MainLoopPosix.cpp index b185c3d3b707..5b50b450433e 100644 --- a/contrib/llvm-project/lldb/source/Host/posix/MainLoopPosix.cpp +++ b/contrib/llvm-project/lldb/source/Host/posix/MainLoopPosix.cpp @@ -156,9 +156,12 @@ Status MainLoopPosix::RunImpl::Poll() { size_t sigset_len; } extra_data = {&kernel_sigset, sizeof(kernel_sigset)}; if (syscall(__NR_pselect6, nfds, &read_fd_set, nullptr, nullptr, nullptr, - &extra_data) == -1 && - errno != EINTR) - return Status(errno, eErrorTypePOSIX); + &extra_data) == -1) { + if (errno != EINTR) + return Status(errno, eErrorTypePOSIX); + else + FD_ZERO(&read_fd_set); + } return Status(); } diff --git a/contrib/llvm-project/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp b/contrib/llvm-project/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp index c400ce190b46..bb33b843e024 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp @@ -175,7 +175,8 @@ bool MachineLateInstrsCleanup::processBlock(MachineBasicBlock *MBB) { Reg2DefMap &MBBDefs = RegDefs[MBB->getNumber()]; // Find reusable definitions in the predecessor(s). - if (!MBB->pred_empty() && !MBB->isEHPad()) { + if (!MBB->pred_empty() && !MBB->isEHPad() && + !MBB->isInlineAsmBrIndirectTarget()) { MachineBasicBlock *FirstPred = *MBB->pred_begin(); for (auto [Reg, DefMI] : RegDefs[FirstPred->getNumber()]) if (llvm::all_of( diff --git a/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp index 97f129e200de..dd1e8da2eb48 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp @@ -1121,7 +1121,7 @@ static const unsigned MaxDepth = 6; // actual instructions, otherwise return a non-null dummy value. Return nullptr // on failure. static Value *takeLog2(IRBuilderBase &Builder, Value *Op, unsigned Depth, - bool DoFold) { + bool AssumeNonZero, bool DoFold) { auto IfFold = [DoFold](function_ref Fn) { if (!DoFold) return reinterpret_cast(-1); @@ -1147,14 +1147,18 @@ static Value *takeLog2(IRBuilderBase &Builder, Value *Op, unsigned Depth, // FIXME: Require one use? Value *X, *Y; if (match(Op, m_ZExt(m_Value(X)))) - if (Value *LogX = takeLog2(Builder, X, Depth, DoFold)) + if (Value *LogX = takeLog2(Builder, X, Depth, AssumeNonZero, DoFold)) return IfFold([&]() { return Builder.CreateZExt(LogX, Op->getType()); }); // log2(X << Y) -> log2(X) + Y // FIXME: Require one use unless X is 1? - if (match(Op, m_Shl(m_Value(X), m_Value(Y)))) - if (Value *LogX = takeLog2(Builder, X, Depth, DoFold)) - return IfFold([&]() { return Builder.CreateAdd(LogX, Y); }); + if (match(Op, m_Shl(m_Value(X), m_Value(Y)))) { + auto *BO = cast(Op); + // nuw will be set if the `shl` is trivially non-zero. + if (AssumeNonZero || BO->hasNoUnsignedWrap() || BO->hasNoSignedWrap()) + if (Value *LogX = takeLog2(Builder, X, Depth, AssumeNonZero, DoFold)) + return IfFold([&]() { return Builder.CreateAdd(LogX, Y); }); + } // log2(Cond ? X : Y) -> Cond ? log2(X) : log2(Y) // FIXME: missed optimization: if one of the hands of select is/contains @@ -1162,8 +1166,10 @@ static Value *takeLog2(IRBuilderBase &Builder, Value *Op, unsigned Depth, // FIXME: can both hands contain undef? // FIXME: Require one use? if (SelectInst *SI = dyn_cast(Op)) - if (Value *LogX = takeLog2(Builder, SI->getOperand(1), Depth, DoFold)) - if (Value *LogY = takeLog2(Builder, SI->getOperand(2), Depth, DoFold)) + if (Value *LogX = takeLog2(Builder, SI->getOperand(1), Depth, + AssumeNonZero, DoFold)) + if (Value *LogY = takeLog2(Builder, SI->getOperand(2), Depth, + AssumeNonZero, DoFold)) return IfFold([&]() { return Builder.CreateSelect(SI->getOperand(0), LogX, LogY); }); @@ -1171,13 +1177,18 @@ static Value *takeLog2(IRBuilderBase &Builder, Value *Op, unsigned Depth, // log2(umin(X, Y)) -> umin(log2(X), log2(Y)) // log2(umax(X, Y)) -> umax(log2(X), log2(Y)) auto *MinMax = dyn_cast(Op); - if (MinMax && MinMax->hasOneUse() && !MinMax->isSigned()) - if (Value *LogX = takeLog2(Builder, MinMax->getLHS(), Depth, DoFold)) - if (Value *LogY = takeLog2(Builder, MinMax->getRHS(), Depth, DoFold)) + if (MinMax && MinMax->hasOneUse() && !MinMax->isSigned()) { + // Use AssumeNonZero as false here. Otherwise we can hit case where + // log2(umax(X, Y)) != umax(log2(X), log2(Y)) (because overflow). + if (Value *LogX = takeLog2(Builder, MinMax->getLHS(), Depth, + /*AssumeNonZero*/ false, DoFold)) + if (Value *LogY = takeLog2(Builder, MinMax->getRHS(), Depth, + /*AssumeNonZero*/ false, DoFold)) return IfFold([&]() { - return Builder.CreateBinaryIntrinsic( - MinMax->getIntrinsicID(), LogX, LogY); + return Builder.CreateBinaryIntrinsic(MinMax->getIntrinsicID(), LogX, + LogY); }); + } return nullptr; } @@ -1297,8 +1308,10 @@ Instruction *InstCombinerImpl::visitUDiv(BinaryOperator &I) { } // Op1 udiv Op2 -> Op1 lshr log2(Op2), if log2() folds away. - if (takeLog2(Builder, Op1, /*Depth*/0, /*DoFold*/false)) { - Value *Res = takeLog2(Builder, Op1, /*Depth*/0, /*DoFold*/true); + if (takeLog2(Builder, Op1, /*Depth*/ 0, /*AssumeNonZero*/ true, + /*DoFold*/ false)) { + Value *Res = takeLog2(Builder, Op1, /*Depth*/ 0, + /*AssumeNonZero*/ true, /*DoFold*/ true); return replaceInstUsesWith( I, Builder.CreateLShr(Op0, Res, I.getName(), I.isExact())); } diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 9e0483966d3e..f662e126e378 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -2455,9 +2455,13 @@ bool CompatibleSets::shouldBelongToSameSet(ArrayRef Invokes) { // Can we theoretically form the data operands for the merged `invoke`? auto IsIllegalToMergeArguments = [](auto Ops) { - Type *Ty = std::get<0>(Ops)->getType(); - assert(Ty == std::get<1>(Ops)->getType() && "Incompatible types?"); - return Ty->isTokenTy() && std::get<0>(Ops) != std::get<1>(Ops); + Use &U0 = std::get<0>(Ops); + Use &U1 = std::get<1>(Ops); + if (U0 == U1) + return false; + return U0->getType()->isTokenTy() || + !canReplaceOperandWithVariable(cast(U0.getUser()), + U0.getOperandNo()); }; assert(Invokes.size() == 2 && "Always called with exactly two candidates."); if (any_of(zip(Invokes[0]->data_ops(), Invokes[1]->data_ops()), diff --git a/lib/clang/include/VCSVersion.inc b/lib/clang/include/VCSVersion.inc index 420881e41de4..466b5ce7ecfd 100644 --- a/lib/clang/include/VCSVersion.inc +++ b/lib/clang/include/VCSVersion.inc @@ -1,10 +1,10 @@ // $FreeBSD$ -#define LLVM_REVISION "llvmorg-16.0.2-0-g18ddebe1a1a9" +#define LLVM_REVISION "llvmorg-16.0.3-0-gda3cd333bea5" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-16.0.2-0-g18ddebe1a1a9" +#define CLANG_REVISION "llvmorg-16.0.3-0-gda3cd333bea5" #define CLANG_REPOSITORY "https://github.com/llvm/llvm-project.git" -#define LLDB_REVISION "llvmorg-16.0.2-0-g18ddebe1a1a9" +#define LLDB_REVISION "llvmorg-16.0.3-0-gda3cd333bea5" #define LLDB_REPOSITORY "https://github.com/llvm/llvm-project.git" diff --git a/lib/clang/include/clang/Basic/Version.inc b/lib/clang/include/clang/Basic/Version.inc index c6154e17ec22..13d7baf64730 100644 --- a/lib/clang/include/clang/Basic/Version.inc +++ b/lib/clang/include/clang/Basic/Version.inc @@ -1,10 +1,10 @@ /* $FreeBSD$ */ -#define CLANG_VERSION 16.0.2 -#define CLANG_VERSION_STRING "16.0.2" +#define CLANG_VERSION 16.0.3 +#define CLANG_VERSION_STRING "16.0.3" #define CLANG_VERSION_MAJOR 16 #define CLANG_VERSION_MAJOR_STRING "16" #define CLANG_VERSION_MINOR 0 -#define CLANG_VERSION_PATCHLEVEL 2 +#define CLANG_VERSION_PATCHLEVEL 3 #define CLANG_VENDOR "FreeBSD " diff --git a/lib/clang/include/lld/Common/Version.inc b/lib/clang/include/lld/Common/Version.inc index 4e2cc44c9364..8f4dd4a4b559 100644 --- a/lib/clang/include/lld/Common/Version.inc +++ b/lib/clang/include/lld/Common/Version.inc @@ -1,4 +1,4 @@ // Local identifier in __FreeBSD_version style #define LLD_FREEBSD_VERSION 1400006 -#define LLD_VERSION_STRING "16.0.2 (FreeBSD llvmorg-16.0.2-0-g18ddebe1a1a9-" __XSTRING(LLD_FREEBSD_VERSION) ")" +#define LLD_VERSION_STRING "16.0.3 (FreeBSD llvmorg-16.0.3-0-gda3cd333bea5-" __XSTRING(LLD_FREEBSD_VERSION) ")" diff --git a/lib/clang/include/lldb/Version/Version.inc b/lib/clang/include/lldb/Version/Version.inc index dab8cdb281fa..4434036b81e2 100644 --- a/lib/clang/include/lldb/Version/Version.inc +++ b/lib/clang/include/lldb/Version/Version.inc @@ -1,6 +1,6 @@ -#define LLDB_VERSION 16.0.2 -#define LLDB_VERSION_STRING "16.0.2" +#define LLDB_VERSION 16.0.3 +#define LLDB_VERSION_STRING "16.0.3" #define LLDB_VERSION_MAJOR 16 #define LLDB_VERSION_MINOR 0 -#define LLDB_VERSION_PATCH 2 +#define LLDB_VERSION_PATCH 3 /* #undef LLDB_FULL_VERSION_STRING */ diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index 93cb4b9dd9dc..57914743328d 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -348,10 +348,10 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 16.0.2" +#define PACKAGE_STRING "LLVM 16.0.3" /* Define to the version of this package. */ -#define PACKAGE_VERSION "16.0.2" +#define PACKAGE_VERSION "16.0.3" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ diff --git a/lib/clang/include/llvm/Config/llvm-config.h b/lib/clang/include/llvm/Config/llvm-config.h index b5b415db51c4..3932cfc4d1c3 100644 --- a/lib/clang/include/llvm/Config/llvm-config.h +++ b/lib/clang/include/llvm/Config/llvm-config.h @@ -74,10 +74,10 @@ #define LLVM_VERSION_MINOR 0 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 2 +#define LLVM_VERSION_PATCH 3 /* LLVM version string */ -#define LLVM_VERSION_STRING "16.0.2" +#define LLVM_VERSION_STRING "16.0.3" /* Whether LLVM records statistics for use with GetStatistics(), * PrintStatistics() or PrintStatisticsJSON() diff --git a/lib/clang/include/llvm/Support/VCSRevision.h b/lib/clang/include/llvm/Support/VCSRevision.h index 760d4e828e07..4fa56888d33c 100644 --- a/lib/clang/include/llvm/Support/VCSRevision.h +++ b/lib/clang/include/llvm/Support/VCSRevision.h @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "llvmorg-16.0.2-0-g18ddebe1a1a9" +#define LLVM_REVISION "llvmorg-16.0.3-0-gda3cd333bea5" #define LLVM_REPOSITORY "https://github.com/llvm/llvm-project.git"