Date: Thu, 19 Sep 2019 19:25:02 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> 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... Message-ID: <201909191925.x8JJP2SF084775@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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<BasicBlock *> IndirectDests, ArrayRef<Value *> Args, ArrayRef<OperandBundleDef> 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<BasicBlock>(*(&Op<-1>() - getNumIndirectDests() - 1)); } BasicBlock *getIndirectDest(unsigned i) const { - return cast<BasicBlock>(*(&Op<-1>() - getNumIndirectDests() + i)); + return cast_or_null<BasicBlock>(*(&Op<-1>() - getNumIndirectDests() + i)); } SmallVector<BasicBlock *, 16> getIndirectDests() const { SmallVector<BasicBlock *, 16> IndirectDests; @@ -4087,6 +4090,7 @@ class CallBrInst : public CallBase { *(&Op<-1>() - getNumIndirectDests() - 1) = reinterpret_cast<Value *>(B); } void setIndirectDest(unsigned i, BasicBlock *B) { + updateArgBlockAddresses(i, B); *(&Op<-1>() - getNumIndirectDests() + i) = reinterpret_cast<Value *>(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<Value *>(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<MachineOperand, 4> 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<BlockAddress>(getArgOperand(ArgNo)) == Old) + setArgOperand(ArgNo, New); + } +} + CallBrInst::CallBrInst(const CallBrInst &CBI) : CallBase(CBI.Attrs, CBI.FTy, CBI.getType(), Instruction::CallBr, OperandTraits<CallBase>::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<int, 4> 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<int, 4> 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<int, 4> RepeatedMask; if (is128BitLaneRepeatedShuffleMask(MaskEltVT, Mask, RepeatedMask)) { - ArrayRef<int> LoMask(Mask.data() + 0, 4); - ArrayRef<int> HiMask(Mask.data() + 4, 4); + ArrayRef<int> LoMask(RepeatedMask.data() + 0, 4); + ArrayRef<int> 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<AliasAttr>()) && "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<llvm::FunctionType>(DeclTy)) + llvm::GlobalValue::LinkageTypes LT; + if (isa<llvm::FunctionType>(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<VarDecl>(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" // <Upstream revision at import>-<Local identifier in __FreeBSD_version style> -#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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909191925.x8JJP2SF084775>