From owner-svn-src-vendor@freebsd.org Mon Sep 2 17:49:11 2019 Return-Path: Delivered-To: svn-src-vendor@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 24F86E40B4; Mon, 2 Sep 2019 17:49:11 +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 46Mcyt6jT9z44lb; Mon, 2 Sep 2019 17:49:10 +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 CAFFD1DB98; Mon, 2 Sep 2019 17:49:10 +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 x82HnAtp019658; Mon, 2 Sep 2019 17:49:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x82Hn99c019651; Mon, 2 Sep 2019 17:49:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201909021749.x82Hn99c019651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Sep 2019 17:49:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r351711 - in vendor/clang/dist-release_90: include/clang/Frontend lib/Basic/Targets lib/Headers lib/Sema X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/clang/dist-release_90: include/clang/Frontend lib/Basic/Targets lib/Headers lib/Sema X-SVN-Commit-Revision: 351711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2019 17:49:11 -0000 Author: dim Date: Mon Sep 2 17:49:08 2019 New Revision: 351711 URL: https://svnweb.freebsd.org/changeset/base/351711 Log: Vendor import of clang release_90 branch r370514: https://llvm.org/svn/llvm-project/cfe/branches/release_90@370514 Modified: vendor/clang/dist-release_90/include/clang/Frontend/LangStandards.def vendor/clang/dist-release_90/lib/Basic/Targets/RISCV.cpp vendor/clang/dist-release_90/lib/Basic/Targets/RISCV.h vendor/clang/dist-release_90/lib/Headers/opencl-c.h vendor/clang/dist-release_90/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist-release_90/lib/Sema/SemaTemplate.cpp vendor/clang/dist-release_90/lib/Sema/SemaType.cpp Modified: vendor/clang/dist-release_90/include/clang/Frontend/LangStandards.def ============================================================================== --- vendor/clang/dist-release_90/include/clang/Frontend/LangStandards.def Mon Sep 2 17:49:06 2019 (r351710) +++ vendor/clang/dist-release_90/include/clang/Frontend/LangStandards.def Mon Sep 2 17:49:08 2019 (r351711) @@ -165,7 +165,7 @@ LANGSTANDARD(opencl12, "cl1.2", LANGSTANDARD(opencl20, "cl2.0", OpenCL, "OpenCL 2.0", LineComment | C99 | Digraphs | HexFloat | OpenCL) -LANGSTANDARD(openclcpp, "c++", +LANGSTANDARD(openclcpp, "clc++", OpenCL, "C++ for OpenCL", LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 | Digraphs | HexFloat | OpenCL) Modified: vendor/clang/dist-release_90/lib/Basic/Targets/RISCV.cpp ============================================================================== --- vendor/clang/dist-release_90/lib/Basic/Targets/RISCV.cpp Mon Sep 2 17:49:06 2019 (r351710) +++ vendor/clang/dist-release_90/lib/Basic/Targets/RISCV.cpp Mon Sep 2 17:49:08 2019 (r351711) @@ -60,6 +60,10 @@ bool RISCVTargetInfo::validateAsmConstraint( // A floating-point register. Info.setAllowsRegister(); return true; + case 'A': + // An address that is held in a general-purpose register. + Info.setAllowsMemory(); + return true; } } Modified: vendor/clang/dist-release_90/lib/Basic/Targets/RISCV.h ============================================================================== --- vendor/clang/dist-release_90/lib/Basic/Targets/RISCV.h Mon Sep 2 17:49:06 2019 (r351710) +++ vendor/clang/dist-release_90/lib/Basic/Targets/RISCV.h Mon Sep 2 17:49:08 2019 (r351711) @@ -93,6 +93,13 @@ class LLVM_LIBRARY_VISIBILITY RISCV32TargetInfo : publ } return false; } + + void setMaxAtomicWidth() override { + MaxAtomicPromoteWidth = 128; + + if (HasA) + MaxAtomicInlineWidth = 32; + } }; class LLVM_LIBRARY_VISIBILITY RISCV64TargetInfo : public RISCVTargetInfo { public: @@ -109,6 +116,13 @@ class LLVM_LIBRARY_VISIBILITY RISCV64TargetInfo : publ return true; } return false; + } + + void setMaxAtomicWidth() override { + MaxAtomicPromoteWidth = 128; + + if (HasA) + MaxAtomicInlineWidth = 64; } }; } // namespace targets Modified: vendor/clang/dist-release_90/lib/Headers/opencl-c.h ============================================================================== --- vendor/clang/dist-release_90/lib/Headers/opencl-c.h Mon Sep 2 17:49:06 2019 (r351710) +++ vendor/clang/dist-release_90/lib/Headers/opencl-c.h Mon Sep 2 17:49:08 2019 (r351711) @@ -15350,7 +15350,7 @@ ndrange_t __ovld ndrange_3D(const size_t[3]); ndrange_t __ovld ndrange_3D(const size_t[3], const size_t[3]); ndrange_t __ovld ndrange_3D(const size_t[3], const size_t[3], const size_t[3]); -int __ovld enqueue_marker(queue_t, uint, const __private clk_event_t*, __private clk_event_t*); +int __ovld enqueue_marker(queue_t, uint, const clk_event_t*, clk_event_t*); void __ovld retain_event(clk_event_t); Modified: vendor/clang/dist-release_90/lib/Sema/SemaDeclCXX.cpp ============================================================================== --- vendor/clang/dist-release_90/lib/Sema/SemaDeclCXX.cpp Mon Sep 2 17:49:06 2019 (r351710) +++ vendor/clang/dist-release_90/lib/Sema/SemaDeclCXX.cpp Mon Sep 2 17:49:08 2019 (r351711) @@ -1225,7 +1225,8 @@ static bool checkTupleLikeDecomposition(Sema &S, if (E.isInvalid()) return true; RefVD->setInit(E.get()); - RefVD->checkInitIsICE(); + if (!E.get()->isValueDependent()) + RefVD->checkInitIsICE(); E = S.BuildDeclarationNameExpr(CXXScopeSpec(), DeclarationNameInfo(B->getDeclName(), Loc), Modified: vendor/clang/dist-release_90/lib/Sema/SemaTemplate.cpp ============================================================================== --- vendor/clang/dist-release_90/lib/Sema/SemaTemplate.cpp Mon Sep 2 17:49:06 2019 (r351710) +++ vendor/clang/dist-release_90/lib/Sema/SemaTemplate.cpp Mon Sep 2 17:49:08 2019 (r351711) @@ -4692,6 +4692,7 @@ SubstDefaultTemplateArgument(Sema &SemaRef, for (unsigned i = 0, e = Param->getDepth(); i != e; ++i) TemplateArgLists.addOuterTemplateArguments(None); + Sema::ContextRAII SavedContext(SemaRef, Template->getDeclContext()); EnterExpressionEvaluationContext ConstantEvaluated( SemaRef, Sema::ExpressionEvaluationContext::ConstantEvaluated); return SemaRef.SubstExpr(Param->getDefaultArgument(), TemplateArgLists); Modified: vendor/clang/dist-release_90/lib/Sema/SemaType.cpp ============================================================================== --- vendor/clang/dist-release_90/lib/Sema/SemaType.cpp Mon Sep 2 17:49:06 2019 (r351710) +++ vendor/clang/dist-release_90/lib/Sema/SemaType.cpp Mon Sep 2 17:49:08 2019 (r351711) @@ -7390,8 +7390,22 @@ static void deduceOpenCLImplicitAddrSpace(TypeProcessi bool IsPointee = ChunkIndex > 0 && (D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::Pointer || - D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::BlockPointer || - D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::Reference); + D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::Reference || + D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::BlockPointer); + // For pointers/references to arrays the next chunk is always an array + // followed by any number of parentheses. + if (!IsPointee && ChunkIndex > 1) { + auto AdjustedCI = ChunkIndex - 1; + if (D.getTypeObject(AdjustedCI).Kind == DeclaratorChunk::Array) + AdjustedCI--; + // Skip over all parentheses. + while (AdjustedCI > 0 && + D.getTypeObject(AdjustedCI).Kind == DeclaratorChunk::Paren) + AdjustedCI--; + if (D.getTypeObject(AdjustedCI).Kind == DeclaratorChunk::Pointer || + D.getTypeObject(AdjustedCI).Kind == DeclaratorChunk::Reference) + IsPointee = true; + } bool IsFuncReturnType = ChunkIndex > 0 && D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::Function;