Date: Wed, 24 Feb 2016 21:33:38 +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: r296005 - in vendor/clang/dist: docs lib/CodeGen lib/Sema test/CodeGen test/Sema Message-ID: <201602242133.u1OLXc3W066583@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Wed Feb 24 21:33:38 2016 New Revision: 296005 URL: https://svnweb.freebsd.org/changeset/base/296005 Log: Vendor import of clang release_38 branch r261684: https://llvm.org/svn/llvm-project/cfe/branches/release_38@261684 Modified: vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/test/CodeGen/ppc-varargs-struct.c vendor/clang/dist/test/Sema/generic-selection.c Modified: vendor/clang/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/clang/dist/docs/ReleaseNotes.rst Wed Feb 24 21:33:19 2016 (r296004) +++ vendor/clang/dist/docs/ReleaseNotes.rst Wed Feb 24 21:33:38 2016 (r296005) @@ -179,6 +179,33 @@ Several additional features/bugfixes hav - Improved diagnostics for function pointers. +OpenMP Support in Clang +--------------------- + +OpenMP 3.1 is fully supported and is enabled by default with -fopenmp +which now uses the clang OpenMP library instead of the GCC OpenMP library. +The runtime can be built in-tree. + +In addition to OpenMP 3.1, several important elements of the OpenMP 4.0/4.5 +are supported as well. We continue to aim to complete OpenMP 4.5 + +- ``map`` clause +- task dependencies +- ``num_teams`` clause +- ``thread_limit`` clause +- ``target`` and ``target data`` directive +- ``target`` directive with implicit data mapping +- ``target enter data`` and ``target exit data`` directive +- Array sections [2.4, Array Sections]. +- Directive name modifiers for ``if`` clause [2.12, if Clause]. +- ``linear`` clause can be used in loop-based directives [2.7.2, loop Construct]. +- ``simdlen`` clause [2.8, SIMD Construct]. +- ``hint`` clause [2.13.2, critical Construct]. +- Parsing/semantic analysis of all non-device directives introduced in OpenMP 4.5. + +The codegen for OpenMP constructs was significantly improved allowing us to produce much more stable and fast code. +Full test cases of IR are also implemented. + CUDA Support in Clang --------------------- Clang has experimental support for end-to-end CUDA compilation now: Modified: vendor/clang/dist/lib/CodeGen/TargetInfo.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/TargetInfo.cpp Wed Feb 24 21:33:19 2016 (r296004) +++ vendor/clang/dist/lib/CodeGen/TargetInfo.cpp Wed Feb 24 21:33:38 2016 (r296005) @@ -3475,6 +3475,7 @@ public: Address PPC32_SVR4_ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAList, QualType Ty) const { + const unsigned OverflowLimit = 8; if (const ComplexType *CTy = Ty->getAs<ComplexType>()) { // TODO: Implement this. For now ignore. (void)CTy; @@ -3517,7 +3518,7 @@ Address PPC32_SVR4_ABIInfo::EmitVAArg(Co } llvm::Value *CC = - Builder.CreateICmpULT(NumRegs, Builder.getInt8(8), "cond"); + Builder.CreateICmpULT(NumRegs, Builder.getInt8(OverflowLimit), "cond"); llvm::BasicBlock *UsingRegs = CGF.createBasicBlock("using_regs"); llvm::BasicBlock *UsingOverflow = CGF.createBasicBlock("using_overflow"); @@ -3569,6 +3570,8 @@ Address PPC32_SVR4_ABIInfo::EmitVAArg(Co { CGF.EmitBlock(UsingOverflow); + Builder.CreateStore(Builder.getInt8(OverflowLimit), NumRegsAddr); + // Everything in the overflow area is rounded up to a size of at least 4. CharUnits OverflowAreaAlign = CharUnits::fromQuantity(4); Modified: vendor/clang/dist/lib/Sema/SemaExpr.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExpr.cpp Wed Feb 24 21:33:19 2016 (r296004) +++ vendor/clang/dist/lib/Sema/SemaExpr.cpp Wed Feb 24 21:33:38 2016 (r296005) @@ -1365,10 +1365,13 @@ Sema::CreateGenericSelectionExpr(SourceL // Decay and strip qualifiers for the controlling expression type, and handle // placeholder type replacement. See committee discussion from WG14 DR423. - ExprResult R = DefaultFunctionArrayLvalueConversion(ControllingExpr); - if (R.isInvalid()) - return ExprError(); - ControllingExpr = R.get(); + { + EnterExpressionEvaluationContext Unevaluated(*this, Sema::Unevaluated); + ExprResult R = DefaultFunctionArrayLvalueConversion(ControllingExpr); + if (R.isInvalid()) + return ExprError(); + ControllingExpr = R.get(); + } // The controlling expression is an unevaluated operand, so side effects are // likely unintended. Modified: vendor/clang/dist/test/CodeGen/ppc-varargs-struct.c ============================================================================== --- vendor/clang/dist/test/CodeGen/ppc-varargs-struct.c Wed Feb 24 21:33:19 2016 (r296004) +++ vendor/clang/dist/test/CodeGen/ppc-varargs-struct.c Wed Feb 24 21:33:38 2016 (r296005) @@ -37,6 +37,7 @@ void testva (int n, ...) // CHECK-PPC-NEXT: br label %[[CONT:[a-z0-9]+]] // // CHECK-PPC:[[USING_OVERFLOW]] +// CHECK-PPC-NEXT: store i8 8, i8* [[GPRPTR]], align 4 // CHECK-PPC-NEXT: [[OVERFLOW_AREA_P:%[0-9]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* [[ARRAYDECAY]], i32 0, i32 3 // CHECK-PPC-NEXT: [[OVERFLOW_AREA:%.+]] = load i8*, i8** [[OVERFLOW_AREA_P]], align 4 // CHECK-PPC-NEXT: %{{[0-9]+}} = ptrtoint i8* %argp.cur to i32 @@ -76,6 +77,7 @@ void testva (int n, ...) // CHECK-PPC-NEXT: br label %[[CONT:[a-z0-9]+]] // // CHECK-PPC:[[USING_OVERFLOW]] +// CHECK-PPC-NEXT: store i8 8, i8* [[GPRPTR]], align 4 // CHECK-PPC-NEXT: [[OVERFLOW_AREA_P:%[0-9]+]] = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* [[ARRAYDECAY]], i32 0, i32 3 // CHECK-PPC-NEXT: [[OVERFLOW_AREA:%.+]] = load i8*, i8** [[OVERFLOW_AREA_P]], align 4 // CHECK-PPC-NEXT: [[MEMADDR:%.+]] = bitcast i8* [[OVERFLOW_AREA]] to i32* Modified: vendor/clang/dist/test/Sema/generic-selection.c ============================================================================== --- vendor/clang/dist/test/Sema/generic-selection.c Wed Feb 24 21:33:19 2016 (r296004) +++ vendor/clang/dist/test/Sema/generic-selection.c Wed Feb 24 21:33:38 2016 (r296005) @@ -31,4 +31,8 @@ void foo(int n) { const int i = 12; int a9[_Generic(i, int: 1, default: 2) == 1 ? 1 : -1]; + + // This is expected to not trigger any diagnostics because the controlling + // expression is not evaluated. + (void)_Generic(*(int *)0, int: 1); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602242133.u1OLXc3W066583>