Skip to content

Commit 403d4e6

Browse files
authored
Amd/dev/rlieberm/fix swdev520040 debug (llvm#1714)
2 parents 3450a62 + d5cfc54 commit 403d4e6

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,8 @@ void CGOpenMPRuntimeGPU::emitReduction(
19111911
CGF.AllocaInsertPt->getIterator());
19121912
InsertPointTy CodeGenIP(CGF.Builder.GetInsertBlock(),
19131913
CGF.Builder.GetInsertPoint());
1914-
llvm::OpenMPIRBuilder::LocationDescription OmpLoc(CodeGenIP);
1914+
llvm::OpenMPIRBuilder::LocationDescription OmpLoc(
1915+
CodeGenIP, CGF.SourceLocToDebugLoc(Loc));
19151916
llvm::SmallVector<llvm::OpenMPIRBuilder::ReductionInfo> ReductionInfos;
19161917

19171918
CodeGenFunction::OMPPrivateScope Scope(CGF);

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3447,11 +3447,6 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createReductionsGPU(
34473447
else
34483448
Config.setGridValue(getGridValue(T, ReductionFunc));
34493449

3450-
uint32_t SrcLocStrSize;
3451-
Constant *SrcLocStr = getOrCreateDefaultSrcLocStr(SrcLocStrSize);
3452-
Value *RTLoc =
3453-
getOrCreateIdent(SrcLocStr, SrcLocStrSize, omp::IdentFlag(0), 0);
3454-
34553450
// Build res = __kmpc_reduce{_nowait}(<gtid>, <n>, sizeof(RedList),
34563451
// RedList, shuffle_reduce_func, interwarp_copy_func);
34573452
// or
@@ -3504,7 +3499,8 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createReductionsGPU(
35043499
Builder.CreatePointerBitCastOrAddrSpaceCast(SarFunc, PtrTy);
35053500
Value *WcFuncCast =
35063501
Builder.CreatePointerBitCastOrAddrSpaceCast(WcFunc, PtrTy);
3507-
Value *Args[] = {RTLoc, ReductionDataSize, RL, SarFuncCast, WcFuncCast};
3502+
Value *Args[] = {SrcLocInfo, ReductionDataSize, RL, SarFuncCast,
3503+
WcFuncCast};
35083504
Function *Pv2Ptr = getOrCreateRuntimeFunctionPtr(
35093505
RuntimeFunction::OMPRTL___kmpc_nvptx_parallel_reduce_nowait_v2);
35103506
Res = Builder.CreateCall(Pv2Ptr, Args);
@@ -3527,7 +3523,7 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createReductionsGPU(
35273523
Value *KernelTeamsReductionPtr = Builder.CreateCall(
35283524
RedFixedBuferFn, {}, "_openmp_teams_reductions_buffer_$_$ptr");
35293525

3530-
Value *Args3[] = {RTLoc,
3526+
Value *Args3[] = {SrcLocInfo,
35313527
KernelTeamsReductionPtr,
35323528
Builder.getInt32(ReductionBufNum),
35333529
ReductionDataSize,

0 commit comments

Comments
 (0)