[clang] [NVPTX] Set cache line size to 128 for __GCC_DESTRUCTIVE_SIZE (PR #115248)

via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 6 17:51:06 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Joseph Huber (jhuber6)

<details>
<summary>Changes</summary>

Summary:
According to the white papers, the cache line size on NVPTX
architectures is 128 bytes. This should be what's returned by these
preprocessor macros.


---
Full diff: https://github.com/llvm/llvm-project/pull/115248.diff


1 Files Affected:

- (modified) clang/lib/Basic/Targets/NVPTX.h (+4) 


``````````diff
diff --git a/clang/lib/Basic/Targets/NVPTX.h b/clang/lib/Basic/Targets/NVPTX.h
index 165b28a60fb2a9..b1a07cdc6ed6bc 100644
--- a/clang/lib/Basic/Targets/NVPTX.h
+++ b/clang/lib/Basic/Targets/NVPTX.h
@@ -186,6 +186,10 @@ class LLVM_LIBRARY_VISIBILITY NVPTXTargetInfo : public TargetInfo {
   bool hasBFloat16Type() const override { return true; }
 
   OffloadArch getGPU() const { return GPU; }
+
+  std::pair<unsigned, unsigned> hardwareInterferenceSizes() const override {
+    return std::make_pair(128, 128);
+  }
 };
 } // namespace targets
 } // namespace clang

``````````

</details>


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


More information about the cfe-commits mailing list