Vendor import of clang release_38 branch r261684:
https://llvm.org/svn/llvm-project/cfe/branches/release_38@261684
This commit is contained in:
parent
4d7895b3fe
commit
283b7f1757
@ -179,6 +179,33 @@ Several additional features/bugfixes have been added to the previous standards:
|
||||
|
||||
- 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:
|
||||
|
@ -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(CodeGenFunction &CGF, Address VAList,
|
||||
}
|
||||
|
||||
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(CodeGenFunction &CGF, Address VAList,
|
||||
{
|
||||
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);
|
||||
|
||||
|
@ -1365,10 +1365,13 @@ Sema::CreateGenericSelectionExpr(SourceLocation KeyLoc,
|
||||
|
||||
// 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.
|
||||
|
@ -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*
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user