From owner-svn-src-projects@freebsd.org Thu Sep 19 19:25:05 2019 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4799012C536 for ; Thu, 19 Sep 2019 19:25:05 +0000 (UTC) (envelope-from dim@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46Z6Hj1xn7z49t8; Thu, 19 Sep 2019 19:25:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 045661A1D6; Thu, 19 Sep 2019 19:25:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8JJP4l1084789; Thu, 19 Sep 2019 19:25:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8JJP2SF084775; Thu, 19 Sep 2019 19:25:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201909191925.x8JJP2SF084775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 19 Sep 2019 19:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r352536 - in projects/clang900-import: contrib/llvm/include/llvm/IR contrib/llvm/lib/CodeGen contrib/llvm/lib/IR contrib/llvm/lib/Target/X86 contrib/llvm/lib/Transforms/Utils contrib/ll... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang900-import: contrib/llvm/include/llvm/IR contrib/llvm/lib/CodeGen contrib/llvm/lib/IR contrib/llvm/lib/Target/X86 contrib/llvm/lib/Transforms/Utils contrib/llvm/tools/clang/include/cl... X-SVN-Commit-Revision: 352536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2019 19:25:05 -0000 Author: dim Date: Thu Sep 19 19:25:01 2019 New Revision: 352536 URL: https://svnweb.freebsd.org/changeset/base/352536 Log: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmp release 9.0.0 r372316, and update version numbers. Replaced: projects/clang900-import/contrib/llvm/tools/lldb/utils/ - copied from r352534, vendor/lldb/dist-release_90/utils/ Modified: projects/clang900-import/contrib/llvm/include/llvm/IR/Instructions.h projects/clang900-import/contrib/llvm/lib/CodeGen/IfConversion.cpp projects/clang900-import/contrib/llvm/lib/IR/Instructions.cpp projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp projects/clang900-import/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp projects/clang900-import/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def projects/clang900-import/contrib/llvm/tools/clang/lib/AST/Decl.cpp projects/clang900-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp projects/clang900-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp projects/clang900-import/lib/clang/include/VCSVersion.inc projects/clang900-import/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: projects/clang900-import/contrib/compiler-rt/ (props changed) projects/clang900-import/contrib/libc++/ (props changed) projects/clang900-import/contrib/libunwind/ (props changed) projects/clang900-import/contrib/llvm/ (props changed) projects/clang900-import/contrib/llvm/tools/clang/ (props changed) projects/clang900-import/contrib/llvm/tools/lld/ (props changed) projects/clang900-import/contrib/llvm/tools/lldb/ (props changed) projects/clang900-import/contrib/openmp/ (props changed) Modified: projects/clang900-import/contrib/llvm/include/llvm/IR/Instructions.h ============================================================================== --- projects/clang900-import/contrib/llvm/include/llvm/IR/Instructions.h Thu Sep 19 18:50:42 2019 (r352535) +++ projects/clang900-import/contrib/llvm/include/llvm/IR/Instructions.h Thu Sep 19 19:25:01 2019 (r352536) @@ -3938,6 +3938,9 @@ class CallBrInst : public CallBase { ArrayRef IndirectDests, ArrayRef Args, ArrayRef Bundles, const Twine &NameStr); + /// Should the Indirect Destinations change, scan + update the Arg list. + void updateArgBlockAddresses(unsigned i, BasicBlock *B); + /// Compute the number of operands to allocate. static int ComputeNumOperands(int NumArgs, int NumIndirectDests, int NumBundleInputs = 0) { @@ -4075,7 +4078,7 @@ class CallBrInst : public CallBase { return cast(*(&Op<-1>() - getNumIndirectDests() - 1)); } BasicBlock *getIndirectDest(unsigned i) const { - return cast(*(&Op<-1>() - getNumIndirectDests() + i)); + return cast_or_null(*(&Op<-1>() - getNumIndirectDests() + i)); } SmallVector getIndirectDests() const { SmallVector IndirectDests; @@ -4087,6 +4090,7 @@ class CallBrInst : public CallBase { *(&Op<-1>() - getNumIndirectDests() - 1) = reinterpret_cast(B); } void setIndirectDest(unsigned i, BasicBlock *B) { + updateArgBlockAddresses(i, B); *(&Op<-1>() - getNumIndirectDests() + i) = reinterpret_cast(B); } @@ -4096,11 +4100,10 @@ class CallBrInst : public CallBase { return i == 0 ? getDefaultDest() : getIndirectDest(i - 1); } - void setSuccessor(unsigned idx, BasicBlock *NewSucc) { - assert(idx < getNumIndirectDests() + 1 && + void setSuccessor(unsigned i, BasicBlock *NewSucc) { + assert(i < getNumIndirectDests() + 1 && "Successor # out of range for callbr!"); - *(&Op<-1>() - getNumIndirectDests() -1 + idx) = - reinterpret_cast(NewSucc); + return i == 0 ? setDefaultDest(NewSucc) : setIndirectDest(i - 1, NewSucc); } unsigned getNumSuccessors() const { return getNumIndirectDests() + 1; } Modified: projects/clang900-import/contrib/llvm/lib/CodeGen/IfConversion.cpp ============================================================================== --- projects/clang900-import/contrib/llvm/lib/CodeGen/IfConversion.cpp Thu Sep 19 18:50:42 2019 (r352535) +++ projects/clang900-import/contrib/llvm/lib/CodeGen/IfConversion.cpp Thu Sep 19 19:25:01 2019 (r352536) @@ -912,6 +912,12 @@ void IfConverter::AnalyzeBranches(BBInfo &BBI) { BBI.BrCond.clear(); BBI.IsBrAnalyzable = !TII->analyzeBranch(*BBI.BB, BBI.TrueBB, BBI.FalseBB, BBI.BrCond); + if (!BBI.IsBrAnalyzable) { + BBI.TrueBB = nullptr; + BBI.FalseBB = nullptr; + BBI.BrCond.clear(); + } + SmallVector RevCond(BBI.BrCond.begin(), BBI.BrCond.end()); BBI.IsBrReversible = (RevCond.size() == 0) || !TII->reverseBranchCondition(RevCond); Modified: projects/clang900-import/contrib/llvm/lib/IR/Instructions.cpp ============================================================================== --- projects/clang900-import/contrib/llvm/lib/IR/Instructions.cpp Thu Sep 19 18:50:42 2019 (r352535) +++ projects/clang900-import/contrib/llvm/lib/IR/Instructions.cpp Thu Sep 19 19:25:01 2019 (r352536) @@ -822,6 +822,17 @@ void CallBrInst::init(FunctionType *FTy, Value *Fn, Ba setName(NameStr); } +void CallBrInst::updateArgBlockAddresses(unsigned i, BasicBlock *B) { + assert(getNumIndirectDests() > i && "IndirectDest # out of range for callbr"); + if (BasicBlock *OldBB = getIndirectDest(i)) { + BlockAddress *Old = BlockAddress::get(OldBB); + BlockAddress *New = BlockAddress::get(B); + for (unsigned ArgNo = 0, e = getNumArgOperands(); ArgNo != e; ++ArgNo) + if (dyn_cast(getArgOperand(ArgNo)) == Old) + setArgOperand(ArgNo, New); + } +} + CallBrInst::CallBrInst(const CallBrInst &CBI) : CallBase(CBI.Attrs, CBI.FTy, CBI.getType(), Instruction::CallBr, OperandTraits::op_end(this) - CBI.getNumOperands(), Modified: projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Thu Sep 19 18:50:42 2019 (r352535) +++ projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Thu Sep 19 19:25:01 2019 (r352536) @@ -7650,17 +7650,22 @@ static SDValue EltsFromConsecutiveLoads(EVT VT, ArrayR // IsConsecutiveLoadWithZeros - we need to create a shuffle of the loaded // vector and a zero vector to clear out the zero elements. if (!isAfterLegalize && VT.isVector()) { - SmallVector ClearMask(NumElems, -1); - for (unsigned i = 0; i < NumElems; ++i) { - if (ZeroMask[i]) - ClearMask[i] = i + NumElems; - else if (LoadMask[i]) - ClearMask[i] = i; + unsigned NumMaskElts = VT.getVectorNumElements(); + if ((NumMaskElts % NumElems) == 0) { + unsigned Scale = NumMaskElts / NumElems; + SmallVector ClearMask(NumMaskElts, -1); + for (unsigned i = 0; i < NumElems; ++i) { + if (UndefMask[i]) + continue; + int Offset = ZeroMask[i] ? NumMaskElts : 0; + for (unsigned j = 0; j != Scale; ++j) + ClearMask[(i * Scale) + j] = (i * Scale) + j + Offset; + } + SDValue V = CreateLoad(VT, LDBase); + SDValue Z = VT.isInteger() ? DAG.getConstant(0, DL, VT) + : DAG.getConstantFP(0.0, DL, VT); + return DAG.getVectorShuffle(VT, DL, V, Z, ClearMask); } - SDValue V = CreateLoad(VT, LDBase); - SDValue Z = VT.isInteger() ? DAG.getConstant(0, DL, VT) - : DAG.getConstantFP(0.0, DL, VT); - return DAG.getVectorShuffle(VT, DL, V, Z, ClearMask); } } @@ -31664,8 +31669,8 @@ static bool matchUnaryPermuteShuffle(MVT MaskVT, Array if (!ContainsZeros && AllowIntDomain && MaskScalarSizeInBits == 16) { SmallVector RepeatedMask; if (is128BitLaneRepeatedShuffleMask(MaskEltVT, Mask, RepeatedMask)) { - ArrayRef LoMask(Mask.data() + 0, 4); - ArrayRef HiMask(Mask.data() + 4, 4); + ArrayRef LoMask(RepeatedMask.data() + 0, 4); + ArrayRef HiMask(RepeatedMask.data() + 4, 4); // PSHUFLW: permute lower 4 elements only. if (isUndefOrInRange(LoMask, 0, 4) && Modified: projects/clang900-import/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp ============================================================================== --- projects/clang900-import/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp Thu Sep 19 18:50:42 2019 (r352535) +++ projects/clang900-import/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp Thu Sep 19 19:25:01 2019 (r352536) @@ -1480,8 +1480,8 @@ Value *LibCallSimplifier::optimizePow(CallInst *Pow, I if (match(Expo, m_SpecificFP(-1.0))) return B.CreateFDiv(ConstantFP::get(Ty, 1.0), Base, "reciprocal"); - // pow(x, 0.0) -> 1.0 - if (match(Expo, m_SpecificFP(0.0))) + // pow(x, +/-0.0) -> 1.0 + if (match(Expo, m_AnyZeroFP())) return ConstantFP::get(Ty, 1.0); // pow(x, 1.0) -> x Modified: projects/clang900-import/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def ============================================================================== --- projects/clang900-import/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Thu Sep 19 18:50:42 2019 (r352535) +++ projects/clang900-import/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Thu Sep 19 19:25:01 2019 (r352536) @@ -440,7 +440,7 @@ BUILTIN(__builtin_rotateleft64, "UWiUWiUWi", "nc") BUILTIN(__builtin_rotateright8, "UcUcUc", "nc") BUILTIN(__builtin_rotateright16, "UsUsUs", "nc") BUILTIN(__builtin_rotateright32, "UZiUZiUZi", "nc") -BUILTIN(__builtin_rotateright64, "UWiUWiWi", "nc") +BUILTIN(__builtin_rotateright64, "UWiUWiUWi", "nc") // Random GCC builtins BUILTIN(__builtin_constant_p, "i.", "nctu") Modified: projects/clang900-import/contrib/llvm/tools/clang/lib/AST/Decl.cpp ============================================================================== --- projects/clang900-import/contrib/llvm/tools/clang/lib/AST/Decl.cpp Thu Sep 19 18:50:42 2019 (r352535) +++ projects/clang900-import/contrib/llvm/tools/clang/lib/AST/Decl.cpp Thu Sep 19 19:25:01 2019 (r352536) @@ -3332,7 +3332,8 @@ SourceRange FunctionDecl::getExceptionSpecSourceRange( /// an externally visible symbol, but "extern inline" will not create an /// externally visible symbol. bool FunctionDecl::isInlineDefinitionExternallyVisible() const { - assert((doesThisDeclarationHaveABody() || willHaveBody()) && + assert((doesThisDeclarationHaveABody() || willHaveBody() || + hasAttr()) && "Must be a function definition"); assert(isInlined() && "Function must be inline"); ASTContext &Context = getASTContext(); Modified: projects/clang900-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp ============================================================================== --- projects/clang900-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp Thu Sep 19 18:50:42 2019 (r352535) +++ projects/clang900-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp Thu Sep 19 19:25:01 2019 (r352536) @@ -35,7 +35,7 @@ std::string getClangRepositoryPath() { // If the CLANG_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_90/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_900/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); Modified: projects/clang900-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp ============================================================================== --- projects/clang900-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp Thu Sep 19 18:50:42 2019 (r352535) +++ projects/clang900-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp Thu Sep 19 19:25:01 2019 (r352536) @@ -4355,17 +4355,22 @@ void CodeGenModule::EmitAliasDefinition(GlobalDecl GD) // Create a reference to the named value. This ensures that it is emitted // if a deferred decl. llvm::Constant *Aliasee; - if (isa(DeclTy)) + llvm::GlobalValue::LinkageTypes LT; + if (isa(DeclTy)) { Aliasee = GetOrCreateLLVMFunction(AA->getAliasee(), DeclTy, GD, /*ForVTable=*/false); - else + LT = getFunctionLinkage(GD); + } else { Aliasee = GetOrCreateLLVMGlobal(AA->getAliasee(), llvm::PointerType::getUnqual(DeclTy), /*D=*/nullptr); + LT = getLLVMLinkageVarDefinition(cast(GD.getDecl()), + D->getType().isConstQualified()); + } // Create the new alias itself, but don't set a name yet. - auto *GA = llvm::GlobalAlias::create( - DeclTy, 0, llvm::Function::ExternalLinkage, "", Aliasee, &getModule()); + auto *GA = + llvm::GlobalAlias::create(DeclTy, 0, LT, "", Aliasee, &getModule()); if (Entry) { if (GA->getAliasee() == Entry) { Modified: projects/clang900-import/lib/clang/include/VCSVersion.inc ============================================================================== --- projects/clang900-import/lib/clang/include/VCSVersion.inc Thu Sep 19 18:50:42 2019 (r352535) +++ projects/clang900-import/lib/clang/include/VCSVersion.inc Thu Sep 19 19:25:01 2019 (r352536) @@ -1,14 +1,14 @@ // $FreeBSD$ -#define LLVM_REVISION "371301" -#define LLVM_REPOSITORY "https://llvm.org/svn/llvm-project/llvm/branches/release_90" +#define LLVM_REVISION "372316" +#define LLVM_REPOSITORY "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_900/final" -#define CLANG_REVISION "371301" -#define CLANG_REPOSITORY "https://llvm.org/svn/llvm-project/cfe/branches/release_90" +#define CLANG_REVISION "372316" +#define CLANG_REPOSITORY "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_900/final" // - -#define LLD_REVISION "371301-1300004" +#define LLD_REVISION "372316-1300004" #define LLD_REPOSITORY "FreeBSD" -#define LLDB_REVISION "371301" -#define LLDB_REPOSITORY "https://llvm.org/svn/llvm-project/lldb/branches/release_90" +#define LLDB_REVISION "372316" +#define LLDB_REPOSITORY "https://llvm.org/svn/llvm-project/lldb/tags/RELEASE_900/final" Modified: projects/clang900-import/lib/clang/include/llvm/Support/VCSRevision.h ============================================================================== --- projects/clang900-import/lib/clang/include/llvm/Support/VCSRevision.h Thu Sep 19 18:50:42 2019 (r352535) +++ projects/clang900-import/lib/clang/include/llvm/Support/VCSRevision.h Thu Sep 19 19:25:01 2019 (r352536) @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "371301" -#define LLVM_REPOSITORY "https://llvm.org/svn/llvm-project/llvm/branches/release_90" +#define LLVM_REVISION "372316" +#define LLVM_REPOSITORY "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_900/final"