Date: Mon, 2 Sep 2019 17:49:09 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> 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 Message-ID: <201909021749.x82Hn99c019651@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909021749.x82Hn99c019651>