Skip to content

Commit e333c08

Browse files
TIFitisronlieb
authored andcommitted
[OpenMP] Fix OpenMPIRBuilder generating incorrect duplicate SrcLocInfo (llvm#100364)
This should further fix some of the incorrect debug info being generated related to llvm#97458
1 parent ac846ce commit e333c08

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

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)