[Openmp-commits] [openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

via Openmp-commits openmp-commits at lists.llvm.org
Fri Nov 3 14:33:52 PDT 2023


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 3cf9bf343de5fbc0b755572c60e8ed53628ff614 36976c1a97518c9cdf080d80b5fab2b16837b055 -- clang/include/clang/Basic/TargetOptions.h clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/Targets/AMDGPU.cpp clang/test/CodeGen/amdgpu-abi-version.c clang/test/CodeGen/amdgpu-address-spaces.cpp openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp openmp/libomptarget/plugins-nextgen/amdgpu/utils/UtilitiesRTL.h
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/Targets/AMDGPU.cpp b/clang/lib/CodeGen/Targets/AMDGPU.cpp
index d793d27e0db8..4dd25213dda9 100644
--- a/clang/lib/CodeGen/Targets/AMDGPU.cpp
+++ b/clang/lib/CodeGen/Targets/AMDGPU.cpp
@@ -367,7 +367,8 @@ void AMDGPUTargetCodeGenInfo::emitTargetGlobals(
   if (OriginalGV && !llvm::GlobalVariable::isExternalLinkage(OriginalGV->getLinkage()))
     return;
 
-  if(CGM.getTarget().getTargetOpts().CodeObjectVersion == clang::TargetOptions::COV_None)
+  if (CGM.getTarget().getTargetOpts().CodeObjectVersion ==
+      clang::TargetOptions::COV_None)
     return;
 
   auto *Type = llvm::IntegerType::getIntNTy(CGM.getModule().getContext(), 32);
diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
index c16b1a147982..1d7763fe37fe 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -2633,7 +2633,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
         });
   }
 
-/// Get the address of pointer to the preallocated device memory pool.
+  /// Get the address of pointer to the preallocated device memory pool.
   void *getPreAllocatedDeviceMemoryPool() {
     return PreAllocatedDeviceMemoryPool;
   }
@@ -2652,7 +2652,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
 
       if (MemoryPool->isCoarseGrained()) {
         DevPtr = nullptr;
-        size_t PreAllocSize = 131072; //128 KB
+        size_t PreAllocSize = 131072; // 128 KB
 
         Err = MemoryPool->allocate(PreAllocSize, &DevPtr);
         if (Err)

``````````

</details>


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


More information about the Openmp-commits mailing list