[clang] [llvm] [OpenMP][Offload] Add FB_NULLIFY map-type for `use_device_ptr(fb_nullify)`. (PR #169603)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 25 20:09:39 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions c,cpp,h -- llvm/include/llvm/Frontend/OpenMP/OMPConstants.h offload/include/omptarget.h offload/libomptarget/omptarget.cpp offload/test/mapping/use_device_addr/target_data_use_device_addr_arrsec_fallback.c offload/test/mapping/use_device_addr/target_data_use_device_addr_arrsec_not_existing.cpp offload/test/mapping/use_device_addr/target_data_use_device_addr_arrsec_ref_not_existing.cpp offload/test/mapping/use_device_addr/target_data_use_device_addr_var_fallback.c offload/test/mapping/use_device_addr/target_data_use_device_addr_var_not_existing.cpp offload/test/mapping/use_device_addr/target_data_use_device_addr_var_ref_not_existing.cpp offload/test/mapping/use_device_addr/target_wrong_use_device_addr.c offload/test/mapping/use_device_ptr/target_data_use_device_ptr_not_existing.cpp offload/test/mapping/use_device_ptr/target_data_use_device_ptr_ref_not_existing.cpp offload/test/mapping/use_device_ptr/target_data_use_device_ptr_var_fallback.c --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/offload/libomptarget/omptarget.cpp b/offload/libomptarget/omptarget.cpp
index d2376a527..669f8d0b1 100644
--- a/offload/libomptarget/omptarget.cpp
+++ b/offload/libomptarget/omptarget.cpp
@@ -705,7 +705,8 @@ int targetDataBegin(ident_t *Loc, DeviceTy &Device, int32_t ArgNum,
         if (ArgTypes[I] & OMP_TGT_MAPTYPE_FB_NULLIFY) {
           TgtPtrBase = reinterpret_cast<void *>(
               reinterpret_cast<uintptr_t>(nullptr) - Delta);
-          DP("Returning offsetted null pointer " DPxMOD " as fallback (lookup failed)\n",
+          DP("Returning offsetted null pointer " DPxMOD
+             " as fallback (lookup failed)\n",
              DPxPTR(TgtPtrBase));
         } else {
           TgtPtrBase = reinterpret_cast<void *>(

``````````

</details>


https://github.com/llvm/llvm-project/pull/169603


More information about the llvm-commits mailing list