diff options
author | Sergio Afonso <safonsof@amd.com> | 2025-08-14 13:41:26 +0100 |
---|---|---|
committer | Sergio Afonso <safonsof@amd.com> | 2025-08-15 15:49:47 +0100 |
commit | e57c671e6f164cf8fe6cf16ca950ff5b0cc7421c (patch) | |
tree | 7bf140d68d382c361e8861c7e38b2865706a626b | |
parent | bd815722923fad252e5f41910343ef03f6f92883 (diff) | |
download | llvm-users/skatrak/flang-generic-05-parallel-wrapper.zip llvm-users/skatrak/flang-generic-05-parallel-wrapper.tar.gz llvm-users/skatrak/flang-generic-05-parallel-wrapper.tar.bz2 |
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 33a9c8d..8b22112 100644 --- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp +++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp @@ -1406,12 +1406,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(); @@ -1542,7 +1542,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); |