|
@@ -747,9 +747,9 @@ emitCombinerOrInitializer(CodeGenModule &CGM, QualType Ty,
|
|
|
QualType PtrTy = C.getPointerType(Ty).withRestrict();
|
|
|
FunctionArgList Args;
|
|
|
ImplicitParamDecl OmpOutParm(C, /*DC=*/nullptr, Out->getLocation(),
|
|
|
- /*Id=*/nullptr, PtrTy);
|
|
|
+ /*Id=*/nullptr, PtrTy, ImplicitParamDecl::Other);
|
|
|
ImplicitParamDecl OmpInParm(C, /*DC=*/nullptr, In->getLocation(),
|
|
|
- /*Id=*/nullptr, PtrTy);
|
|
|
+ /*Id=*/nullptr, PtrTy, ImplicitParamDecl::Other);
|
|
|
Args.push_back(&OmpOutParm);
|
|
|
Args.push_back(&OmpInParm);
|
|
|
auto &FnInfo =
|
|
@@ -1808,8 +1808,8 @@ llvm::Function *CGOpenMPRuntime::emitThreadPrivateVarDefinition(
|
|
|
// threadprivate copy of the variable VD
|
|
|
CodeGenFunction CtorCGF(CGM);
|
|
|
FunctionArgList Args;
|
|
|
- ImplicitParamDecl Dst(CGM.getContext(), /*DC=*/nullptr, SourceLocation(),
|
|
|
- /*Id=*/nullptr, CGM.getContext().VoidPtrTy);
|
|
|
+ ImplicitParamDecl Dst(CGM.getContext(), CGM.getContext().VoidPtrTy,
|
|
|
+ ImplicitParamDecl::Other);
|
|
|
Args.push_back(&Dst);
|
|
|
|
|
|
auto &FI = CGM.getTypes().arrangeBuiltinFunctionDeclaration(
|
|
@@ -1839,8 +1839,8 @@ llvm::Function *CGOpenMPRuntime::emitThreadPrivateVarDefinition(
|
|
|
// of the variable VD
|
|
|
CodeGenFunction DtorCGF(CGM);
|
|
|
FunctionArgList Args;
|
|
|
- ImplicitParamDecl Dst(CGM.getContext(), /*DC=*/nullptr, SourceLocation(),
|
|
|
- /*Id=*/nullptr, CGM.getContext().VoidPtrTy);
|
|
|
+ ImplicitParamDecl Dst(CGM.getContext(), CGM.getContext().VoidPtrTy,
|
|
|
+ ImplicitParamDecl::Other);
|
|
|
Args.push_back(&Dst);
|
|
|
|
|
|
auto &FI = CGM.getTypes().arrangeBuiltinFunctionDeclaration(
|
|
@@ -2191,10 +2191,8 @@ static llvm::Value *emitCopyprivateCopyFunction(
|
|
|
auto &C = CGM.getContext();
|
|
|
// void copy_func(void *LHSArg, void *RHSArg);
|
|
|
FunctionArgList Args;
|
|
|
- ImplicitParamDecl LHSArg(C, /*DC=*/nullptr, SourceLocation(), /*Id=*/nullptr,
|
|
|
- C.VoidPtrTy);
|
|
|
- ImplicitParamDecl RHSArg(C, /*DC=*/nullptr, SourceLocation(), /*Id=*/nullptr,
|
|
|
- C.VoidPtrTy);
|
|
|
+ ImplicitParamDecl LHSArg(C, C.VoidPtrTy, ImplicitParamDecl::Other);
|
|
|
+ ImplicitParamDecl RHSArg(C, C.VoidPtrTy, ImplicitParamDecl::Other);
|
|
|
Args.push_back(&LHSArg);
|
|
|
Args.push_back(&RHSArg);
|
|
|
auto &CGFI = CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args);
|
|
@@ -2785,8 +2783,7 @@ createOffloadingBinaryDescriptorFunction(CodeGenModule &CGM, StringRef Name,
|
|
|
const RegionCodeGenTy &Codegen) {
|
|
|
auto &C = CGM.getContext();
|
|
|
FunctionArgList Args;
|
|
|
- ImplicitParamDecl DummyPtr(C, /*DC=*/nullptr, SourceLocation(),
|
|
|
- /*Id=*/nullptr, C.VoidPtrTy);
|
|
|
+ ImplicitParamDecl DummyPtr(C, C.VoidPtrTy, ImplicitParamDecl::Other);
|
|
|
Args.push_back(&DummyPtr);
|
|
|
|
|
|
CodeGenFunction CGF(CGM);
|
|
@@ -2889,7 +2886,7 @@ CGOpenMPRuntime::createOffloadingBinaryDescriptorRegistration() {
|
|
|
// descriptor, so we can reuse the logic that emits Ctors and Dtors.
|
|
|
auto *IdentInfo = &C.Idents.get(".omp_offloading.reg_unreg_var");
|
|
|
ImplicitParamDecl RegUnregVar(C, C.getTranslationUnitDecl(), SourceLocation(),
|
|
|
- IdentInfo, C.CharTy);
|
|
|
+ IdentInfo, C.CharTy, ImplicitParamDecl::Other);
|
|
|
|
|
|
auto *UnRegFn = createOffloadingBinaryDescriptorFunction(
|
|
|
CGM, ".omp_offloading.descriptor_unreg",
|
|
@@ -3319,10 +3316,11 @@ emitProxyTaskFunction(CodeGenModule &CGM, SourceLocation Loc,
|
|
|
llvm::Value *TaskPrivatesMap) {
|
|
|
auto &C = CGM.getContext();
|
|
|
FunctionArgList Args;
|
|
|
- ImplicitParamDecl GtidArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, KmpInt32Ty);
|
|
|
- ImplicitParamDecl TaskTypeArg(C, /*DC=*/nullptr, Loc,
|
|
|
- /*Id=*/nullptr,
|
|
|
- KmpTaskTWithPrivatesPtrQTy.withRestrict());
|
|
|
+ ImplicitParamDecl GtidArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, KmpInt32Ty,
|
|
|
+ ImplicitParamDecl::Other);
|
|
|
+ ImplicitParamDecl TaskTypeArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr,
|
|
|
+ KmpTaskTWithPrivatesPtrQTy.withRestrict(),
|
|
|
+ ImplicitParamDecl::Other);
|
|
|
Args.push_back(&GtidArg);
|
|
|
Args.push_back(&TaskTypeArg);
|
|
|
auto &TaskEntryFnInfo =
|
|
@@ -3413,10 +3411,11 @@ static llvm::Value *emitDestructorsFunction(CodeGenModule &CGM,
|
|
|
QualType KmpTaskTWithPrivatesQTy) {
|
|
|
auto &C = CGM.getContext();
|
|
|
FunctionArgList Args;
|
|
|
- ImplicitParamDecl GtidArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, KmpInt32Ty);
|
|
|
- ImplicitParamDecl TaskTypeArg(C, /*DC=*/nullptr, Loc,
|
|
|
- /*Id=*/nullptr,
|
|
|
- KmpTaskTWithPrivatesPtrQTy.withRestrict());
|
|
|
+ ImplicitParamDecl GtidArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, KmpInt32Ty,
|
|
|
+ ImplicitParamDecl::Other);
|
|
|
+ ImplicitParamDecl TaskTypeArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr,
|
|
|
+ KmpTaskTWithPrivatesPtrQTy.withRestrict(),
|
|
|
+ ImplicitParamDecl::Other);
|
|
|
Args.push_back(&GtidArg);
|
|
|
Args.push_back(&TaskTypeArg);
|
|
|
FunctionType::ExtInfo Info;
|
|
@@ -3472,36 +3471,40 @@ emitTaskPrivateMappingFunction(CodeGenModule &CGM, SourceLocation Loc,
|
|
|
FunctionArgList Args;
|
|
|
ImplicitParamDecl TaskPrivatesArg(
|
|
|
C, /*DC=*/nullptr, Loc, /*Id=*/nullptr,
|
|
|
- C.getPointerType(PrivatesQTy).withConst().withRestrict());
|
|
|
+ C.getPointerType(PrivatesQTy).withConst().withRestrict(),
|
|
|
+ ImplicitParamDecl::Other);
|
|
|
Args.push_back(&TaskPrivatesArg);
|
|
|
llvm::DenseMap<const VarDecl *, unsigned> PrivateVarsPos;
|
|
|
unsigned Counter = 1;
|
|
|
for (auto *E: PrivateVars) {
|
|
|
Args.push_back(ImplicitParamDecl::Create(
|
|
|
- C, /*DC=*/nullptr, Loc,
|
|
|
- /*Id=*/nullptr, C.getPointerType(C.getPointerType(E->getType()))
|
|
|
- .withConst()
|
|
|
- .withRestrict()));
|
|
|
+ C, /*DC=*/nullptr, Loc, /*Id=*/nullptr,
|
|
|
+ C.getPointerType(C.getPointerType(E->getType()))
|
|
|
+ .withConst()
|
|
|
+ .withRestrict(),
|
|
|
+ ImplicitParamDecl::Other));
|
|
|
auto *VD = cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl());
|
|
|
PrivateVarsPos[VD] = Counter;
|
|
|
++Counter;
|
|
|
}
|
|
|
for (auto *E : FirstprivateVars) {
|
|
|
Args.push_back(ImplicitParamDecl::Create(
|
|
|
- C, /*DC=*/nullptr, Loc,
|
|
|
- /*Id=*/nullptr, C.getPointerType(C.getPointerType(E->getType()))
|
|
|
- .withConst()
|
|
|
- .withRestrict()));
|
|
|
+ C, /*DC=*/nullptr, Loc, /*Id=*/nullptr,
|
|
|
+ C.getPointerType(C.getPointerType(E->getType()))
|
|
|
+ .withConst()
|
|
|
+ .withRestrict(),
|
|
|
+ ImplicitParamDecl::Other));
|
|
|
auto *VD = cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl());
|
|
|
PrivateVarsPos[VD] = Counter;
|
|
|
++Counter;
|
|
|
}
|
|
|
for (auto *E: LastprivateVars) {
|
|
|
Args.push_back(ImplicitParamDecl::Create(
|
|
|
- C, /*DC=*/nullptr, Loc,
|
|
|
- /*Id=*/nullptr, C.getPointerType(C.getPointerType(E->getType()))
|
|
|
- .withConst()
|
|
|
- .withRestrict()));
|
|
|
+ C, /*DC=*/nullptr, Loc, /*Id=*/nullptr,
|
|
|
+ C.getPointerType(C.getPointerType(E->getType()))
|
|
|
+ .withConst()
|
|
|
+ .withRestrict(),
|
|
|
+ ImplicitParamDecl::Other));
|
|
|
auto *VD = cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl());
|
|
|
PrivateVarsPos[VD] = Counter;
|
|
|
++Counter;
|
|
@@ -3661,12 +3664,14 @@ emitTaskDupFunction(CodeGenModule &CGM, SourceLocation Loc,
|
|
|
ArrayRef<PrivateDataTy> Privates, bool WithLastIter) {
|
|
|
auto &C = CGM.getContext();
|
|
|
FunctionArgList Args;
|
|
|
- ImplicitParamDecl DstArg(C, /*DC=*/nullptr, Loc,
|
|
|
- /*Id=*/nullptr, KmpTaskTWithPrivatesPtrQTy);
|
|
|
- ImplicitParamDecl SrcArg(C, /*DC=*/nullptr, Loc,
|
|
|
- /*Id=*/nullptr, KmpTaskTWithPrivatesPtrQTy);
|
|
|
- ImplicitParamDecl LastprivArg(C, /*DC=*/nullptr, Loc,
|
|
|
- /*Id=*/nullptr, C.IntTy);
|
|
|
+ ImplicitParamDecl DstArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr,
|
|
|
+ KmpTaskTWithPrivatesPtrQTy,
|
|
|
+ ImplicitParamDecl::Other);
|
|
|
+ ImplicitParamDecl SrcArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr,
|
|
|
+ KmpTaskTWithPrivatesPtrQTy,
|
|
|
+ ImplicitParamDecl::Other);
|
|
|
+ ImplicitParamDecl LastprivArg(C, /*DC=*/nullptr, Loc, /*Id=*/nullptr, C.IntTy,
|
|
|
+ ImplicitParamDecl::Other);
|
|
|
Args.push_back(&DstArg);
|
|
|
Args.push_back(&SrcArg);
|
|
|
Args.push_back(&LastprivArg);
|
|
@@ -4278,10 +4283,8 @@ llvm::Value *CGOpenMPRuntime::emitReductionFunction(
|
|
|
|
|
|
// void reduction_func(void *LHSArg, void *RHSArg);
|
|
|
FunctionArgList Args;
|
|
|
- ImplicitParamDecl LHSArg(C, /*DC=*/nullptr, SourceLocation(), /*Id=*/nullptr,
|
|
|
- C.VoidPtrTy);
|
|
|
- ImplicitParamDecl RHSArg(C, /*DC=*/nullptr, SourceLocation(), /*Id=*/nullptr,
|
|
|
- C.VoidPtrTy);
|
|
|
+ ImplicitParamDecl LHSArg(C, C.VoidPtrTy, ImplicitParamDecl::Other);
|
|
|
+ ImplicitParamDecl RHSArg(C, C.VoidPtrTy, ImplicitParamDecl::Other);
|
|
|
Args.push_back(&LHSArg);
|
|
|
Args.push_back(&RHSArg);
|
|
|
auto &CGFI = CGM.getTypes().arrangeBuiltinFunctionDeclaration(C.VoidTy, Args);
|