[Mlir-commits] [clang] [llvm] [mlir] [flang][OpenMP] Support `target enter|update|exit .. nowait` (PR #113305)
Kareem Ergawy
llvmlistbot at llvm.org
Wed Oct 23 00:15:21 PDT 2024
================
@@ -6403,16 +6401,45 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createTargetData(
SrcLocInfo = getOrCreateIdent(SrcLocStr, SrcLocStrSize);
}
- Value *OffloadingArgs[] = {SrcLocInfo, DeviceID,
- PointerNum, RTArgs.BasePointersArray,
- RTArgs.PointersArray, RTArgs.SizesArray,
- RTArgs.MapTypesArray, RTArgs.MapNamesArray,
- RTArgs.MappersArray};
+ SmallVector<llvm::Value *, 13> OffloadingArgs = {
+ SrcLocInfo, DeviceID,
+ PointerNum, RTArgs.BasePointersArray,
+ RTArgs.PointersArray, RTArgs.SizesArray,
+ RTArgs.MapTypesArray, RTArgs.MapNamesArray,
+ RTArgs.MappersArray};
if (IsStandAlone) {
assert(MapperFunc && "MapperFunc missing for standalone target data");
- Builder.CreateCall(getOrCreateRuntimeFunctionPtr(*MapperFunc),
- OffloadingArgs);
+
+ auto TaskBodyCB = [&](Value *, Value *, IRBuilderBase::InsertPoint) {
+ if (Info.HasNoWait) {
+ OffloadingArgs.push_back(llvm::Constant::getNullValue(Int32));
+ OffloadingArgs.push_back(llvm::Constant::getNullValue(VoidPtr));
+ OffloadingArgs.push_back(llvm::Constant::getNullValue(Int32));
+ OffloadingArgs.push_back(llvm::Constant::getNullValue(VoidPtr));
----------------
ergawy wrote:
It does work. Thanks.
https://github.com/llvm/llvm-project/pull/113305
More information about the Mlir-commits
mailing list