@@ -1046,10 +1046,8 @@ llvm::Function *CGOpenMPRuntimeGPU::emitTeamsOutlinedFunction(
1046
1046
}
1047
1047
1048
1048
void CGOpenMPRuntimeGPU::emitGenericVarsProlog (CodeGenFunction &CGF,
1049
- SourceLocation Loc,
1050
- bool WithSPMDCheck) {
1051
- if (getDataSharingMode () != CGOpenMPRuntimeGPU::DS_Generic &&
1052
- getExecutionMode () != CGOpenMPRuntimeGPU::EM_SPMD)
1049
+ SourceLocation Loc) {
1050
+ if (getDataSharingMode () != CGOpenMPRuntimeGPU::DS_Generic)
1053
1051
return ;
1054
1052
1055
1053
CGBuilderTy &Bld = CGF.Builder ;
@@ -1158,10 +1156,8 @@ void CGOpenMPRuntimeGPU::getKmpcFreeShared(
1158
1156
{AddrSizePair.first , AddrSizePair.second });
1159
1157
}
1160
1158
1161
- void CGOpenMPRuntimeGPU::emitGenericVarsEpilog (CodeGenFunction &CGF,
1162
- bool WithSPMDCheck) {
1163
- if (getDataSharingMode () != CGOpenMPRuntimeGPU::DS_Generic &&
1164
- getExecutionMode () != CGOpenMPRuntimeGPU::EM_SPMD)
1159
+ void CGOpenMPRuntimeGPU::emitGenericVarsEpilog (CodeGenFunction &CGF) {
1160
+ if (getDataSharingMode () != CGOpenMPRuntimeGPU::DS_Generic)
1165
1161
return ;
1166
1162
1167
1163
const auto I = FunctionGlobalizedDecls.find (CGF.CurFn );
@@ -3350,13 +3346,13 @@ void CGOpenMPRuntimeGPU::emitFunctionProlog(CodeGenFunction &CGF,
3350
3346
Data.insert (std::make_pair (VD, MappedVarData ()));
3351
3347
}
3352
3348
if (!NeedToDelayGlobalization) {
3353
- emitGenericVarsProlog (CGF, D->getBeginLoc (), /* WithSPMDCheck= */ true );
3349
+ emitGenericVarsProlog (CGF, D->getBeginLoc ());
3354
3350
struct GlobalizationScope final : EHScopeStack::Cleanup {
3355
3351
GlobalizationScope () = default ;
3356
3352
3357
3353
void Emit (CodeGenFunction &CGF, Flags flags) override {
3358
3354
static_cast <CGOpenMPRuntimeGPU &>(CGF.CGM .getOpenMPRuntime ())
3359
- .emitGenericVarsEpilog (CGF, /* WithSPMDCheck= */ true );
3355
+ .emitGenericVarsEpilog (CGF);
3360
3356
}
3361
3357
};
3362
3358
CGF.EHStack .pushCleanup <GlobalizationScope>(NormalAndEHCleanup);
0 commit comments