@@ -4871,8 +4871,8 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::applyStaticWorkshareLoop(
48714871 // Call the "init" function and update the trip count of the loop with the
48724872 // value it produced.
48734873 auto BuildInitCall = [LoopType, SrcLoc, ThreadNum, PLastIter, PLowerBound,
4874- PUpperBound, IVTy, PStride, One, Zero,
4875- StaticInit, this ](Value *SchedulingType, auto &Builder) {
4874+ PUpperBound, IVTy, PStride, One, Zero, StaticInit,
4875+ this ](Value *SchedulingType, auto &Builder) {
48764876 SmallVector<Value *, 10 > Args ({SrcLoc, ThreadNum, SchedulingType, PLastIter,
48774877 PLowerBound, PUpperBound});
48784878 if (LoopType == WorksharingLoopType::DistributeForStaticLoop) {
@@ -5039,16 +5039,17 @@ OpenMPIRBuilder::applyStaticChunkedWorkshareLoop(
50395039 Constant *SrcLocStr = getOrCreateSrcLocStr (DL, SrcLocStrSize);
50405040 Value *SrcLoc = getOrCreateIdent (SrcLocStr, SrcLocStrSize);
50415041 Value *ThreadNum = getOrCreateThreadID (SrcLoc);
5042- auto BuildInitCall =
5043- [StaticInit, SrcLoc, ThreadNum, PLastIter, PLowerBound, PUpperBound,
5044- PStride, One, this ](Value *SchedulingType, Value *ChunkSize, auto &Builder) {
5045- createRuntimeFunctionCall (
5046- StaticInit, {/* loc=*/ SrcLoc, /* global_tid=*/ ThreadNum,
5047- /* schedtype=*/ SchedulingType, /* plastiter=*/ PLastIter,
5048- /* plower=*/ PLowerBound, /* pupper=*/ PUpperBound,
5049- /* pstride=*/ PStride, /* incr=*/ One,
5050- /* chunk=*/ ChunkSize});
5051- };
5042+ auto BuildInitCall = [StaticInit, SrcLoc, ThreadNum, PLastIter, PLowerBound,
5043+ PUpperBound, PStride, One,
5044+ this ](Value *SchedulingType, Value *ChunkSize,
5045+ auto &Builder) {
5046+ createRuntimeFunctionCall (
5047+ StaticInit, {/* loc=*/ SrcLoc, /* global_tid=*/ ThreadNum,
5048+ /* schedtype=*/ SchedulingType, /* plastiter=*/ PLastIter,
5049+ /* plower=*/ PLowerBound, /* pupper=*/ PUpperBound,
5050+ /* pstride=*/ PStride, /* incr=*/ One,
5051+ /* chunk=*/ ChunkSize});
5052+ };
50525053 BuildInitCall (SchedulingType, CastedChunkSize, Builder);
50535054 if (DistScheduleSchedType != OMPScheduleType::None &&
50545055 SchedType != OMPScheduleType::OrderedDistributeChunked &&
0 commit comments