================
@@ -1792,6 +1792,11 @@ class TargetInfo : public TransferrableTargetInfo,
   /// Whether to support HIP image/texture API's.
   virtual bool hasHIPImageSupport() const { return true; }
 
+  /// The minimum offset between two objects to avoid false sharing.
+  virtual unsigned hardwareDestructiveInterferenceSize() const { return 64; }
----------------
jyknight wrote:

I vaguely wonder if we should make this a single "hardwareInterferenceSizes" 
function, returning a std::pair<unsigned, unsigned>, because otherwise, when we 
start add per-CPU tuning to the values, it's very likely to result in 
duplicating the same series of conditionals in each of the two functions.

Also, with a single function, we are less likely to accidentally end up with an 
override that returns values such that `destructive < constructive`.

https://github.com/llvm/llvm-project/pull/89446
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to