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

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.


>From c18a58229b6921b613045a0d380f09bade14c2fb Mon Sep 17 00:00:00 2001
From: Joseph Huber <hube...@outlook.com>
Date: Wed, 6 Nov 2024 19:48:52 -0600
Subject: [PATCH] [NVPTX] Set cache line size to 128 for __GCC_DESTRUCTIVE_SIZE

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.
---
 clang/lib/Basic/Targets/NVPTX.h | 4 ++++
 1 file changed, 4 insertions(+)

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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to