diff options
| author | Sergio Afonso <safonsof@amd.com> | 2025-08-14 13:41:26 +0100 |
|---|---|---|
| committer | Sergio Afonso <safonsof@amd.com> | 2025-10-03 13:05:41 +0100 |
| commit | f027b867b0245b6a5b9e34cfcfac6c3c74366c27 (patch) | |
| tree | 2ae935765393a3980529ee6746cdcc3222682d39 | |
| parent | 9533653e89c7d9abf065a62c7c880cc012886be4 (diff) | |
Address review commentsusers/skatrak/flang-generic-05-parallel-wrapper
| -rw-r--r-- | llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp index 9e43784412d5..26cb529c92e5 100644 --- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp +++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp @@ -1426,12 +1426,12 @@ Error OpenMPIRBuilder::emitCancelationCheckImpl( return Error::success(); } -// Create wrapper function used to gather the outlined function's argument -// structure from a shared buffer and to forward them to it when running in -// Generic mode. -// -// The outlined function is expected to receive 2 integer arguments followed by -// an optional pointer argument to an argument structure holding the rest. +/// Create wrapper function used to gather the outlined function's argument +/// structure from a shared buffer and to forward them to it when running in +/// Generic mode. +/// +/// The outlined function is expected to receive 2 integer arguments followed by +/// an optional pointer argument to an argument structure holding the rest. static Function *createTargetParallelWrapper(OpenMPIRBuilder *OMPIRBuilder, Function &OutlinedFn) { size_t NumArgs = OutlinedFn.arg_size(); @@ -1562,7 +1562,7 @@ static void targetParallelCallback( std::optional<omp::OMPTgtExecModeFlags> ExecMode = getTargetKernelExecMode(*OuterFn); Value *WrapperFn; - if (ExecMode && *ExecMode & OMP_TGT_EXEC_MODE_GENERIC) + if (ExecMode && (*ExecMode & OMP_TGT_EXEC_MODE_GENERIC)) WrapperFn = createTargetParallelWrapper(OMPIRBuilder, OutlinedFn); else WrapperFn = Constant::getNullValue(PtrTy); |
