@@ -1403,11 +1403,11 @@ convertOmpParallel(omp::ParallelOp opInst, llvm::IRBuilderBase &builder,
1403
1403
llvm::Value *nonPrivateVar =
1404
1404
moduleTranslation.lookupValue (opInst.getPrivateVars ()[i]);
1405
1405
assert (nonPrivateVar);
1406
- moduleTranslation.mapValue (allocRegion. getArgument ( 0 ), nonPrivateVar);
1406
+ moduleTranslation.mapValue (privateDecls[i]. getAllocMoldArg ( ), nonPrivateVar);
1407
1407
1408
1408
// in-place convert the private allocation region
1409
1409
SmallVector<llvm::Value *, 1 > phis;
1410
- if (allocRegion. getArgument ( 0 ).getUses ().empty ()) {
1410
+ if (privateDecls[i]. getAllocMoldArg ( ).getUses ().empty ()) {
1411
1411
// TODO this should use
1412
1412
// allocaIP.getBlock()->getFirstNonPHIOrDbgOrAlloca() so it goes before
1413
1413
// the code for fetching the thread id. Not doing this for now to avoid
@@ -1475,10 +1475,10 @@ convertOmpParallel(omp::ParallelOp opInst, llvm::IRBuilderBase &builder,
1475
1475
llvm::Value *nonPrivateVar =
1476
1476
moduleTranslation.lookupValue (opInst.getPrivateVars ()[i]);
1477
1477
assert (nonPrivateVar);
1478
- moduleTranslation.mapValue (copyRegion. getArgument ( 0 ), nonPrivateVar);
1478
+ moduleTranslation.mapValue (privateDecls[i]. getCopyMoldArg ( ), nonPrivateVar);
1479
1479
1480
1480
// map copyRegion lhs arg
1481
- moduleTranslation.mapValue (copyRegion. getArgument ( 1 ), llvmPrivateVars[i]);
1481
+ moduleTranslation.mapValue (privateDecls[i]. getCopyPrivateArg ( ), llvmPrivateVars[i]);
1482
1482
1483
1483
// in-place convert copy region
1484
1484
builder.SetInsertPoint (builder.GetInsertBlock ()->getTerminator ());
0 commit comments