@@ -339,7 +339,7 @@ class CheckVarsEscapingDeclContext final
339
339
assert(!GlobalizedRD &&
340
340
"Record for globalized variables is built already.");
341
341
ArrayRef<const ValueDecl *> EscapedDeclsForParallel, EscapedDeclsForTeams;
342
- unsigned WarpSize = CGF.getTarget().getGridValue(llvm::omp::GV_Warp_Size) ;
342
+ unsigned WarpSize = CGF.getTarget().getGridValue().GV_Warp_Size ;
343
343
if (IsInTTDRegion)
344
344
EscapedDeclsForTeams = EscapedDecls.getArrayRef();
345
345
else
@@ -535,8 +535,7 @@ class CheckVarsEscapingDeclContext final
535
535
/// on the NVPTX device, to generate more efficient code.
536
536
static llvm::Value *getNVPTXWarpID(CodeGenFunction &CGF) {
537
537
CGBuilderTy &Bld = CGF.Builder;
538
- unsigned LaneIDBits =
539
- CGF.getTarget().getGridValue(llvm::omp::GV_Warp_Size_Log2);
538
+ unsigned LaneIDBits = CGF.getTarget().getGridValue().GV_Warp_Size_Log2;
540
539
auto &RT = static_cast<CGOpenMPRuntimeGPU &>(CGF.CGM.getOpenMPRuntime());
541
540
return Bld.CreateAShr(RT.getGPUThreadID(CGF), LaneIDBits, "nvptx_warp_id");
542
541
}
@@ -546,8 +545,8 @@ static llvm::Value *getNVPTXWarpID(CodeGenFunction &CGF) {
546
545
/// on the NVPTX device, to generate more efficient code.
547
546
static llvm::Value *getNVPTXLaneID(CodeGenFunction &CGF) {
548
547
CGBuilderTy &Bld = CGF.Builder;
549
- unsigned LaneIDMask = CGF.getContext().getTargetInfo().getGridValue(
550
- llvm::omp::GV_Warp_Size_Log2_Mask) ;
548
+ unsigned LaneIDMask =
549
+ CGF.getContext().getTargetInfo().getGridValue().GV_Warp_Size_Log2_Mask ;
551
550
auto &RT = static_cast<CGOpenMPRuntimeGPU &>(CGF.CGM.getOpenMPRuntime());
552
551
return Bld.CreateAnd(RT.getGPUThreadID(CGF), Bld.getInt32(LaneIDMask),
553
552
"nvptx_lane_id");
@@ -1308,7 +1307,7 @@ llvm::Function *CGOpenMPRuntimeGPU::emitTeamsOutlinedFunction(
1308
1307
const RecordDecl *GlobalizedRD = nullptr;
1309
1308
llvm::SmallVector<const ValueDecl *, 4> LastPrivatesReductions;
1310
1309
llvm::SmallDenseMap<const ValueDecl *, const FieldDecl *> MappedDeclsFields;
1311
- unsigned WarpSize = CGM.getTarget().getGridValue(llvm::omp::GV_Warp_Size) ;
1310
+ unsigned WarpSize = CGM.getTarget().getGridValue().GV_Warp_Size ;
1312
1311
// Globalize team reductions variable unconditionally in all modes.
1313
1312
if (getExecutionMode() != CGOpenMPRuntimeGPU::EM_SPMD)
1314
1313
getTeamsReductionVars(CGM.getContext(), D, LastPrivatesReductions);
@@ -2089,7 +2088,7 @@ static llvm::Value *emitInterWarpCopyFunction(CodeGenModule &CGM,
2089
2088
"__openmp_nvptx_data_transfer_temporary_storage";
2090
2089
llvm::GlobalVariable *TransferMedium =
2091
2090
M.getGlobalVariable(TransferMediumName);
2092
- unsigned WarpSize = CGF.getTarget().getGridValue(llvm::omp::GV_Warp_Size) ;
2091
+ unsigned WarpSize = CGF.getTarget().getGridValue().GV_Warp_Size ;
2093
2092
if (!TransferMedium) {
2094
2093
auto *Ty = llvm::ArrayType::get(CGM.Int32Ty, WarpSize);
2095
2094
unsigned SharedAddressSpace = C.getTargetAddressSpace(LangAS::cuda_shared);
0 commit comments