[PATCH] D74918: Add method to TargetInfo to get CPU cache line size

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 20 14:02:39 PST 2020


jfb added inline comments.


================
Comment at: clang/include/clang/Basic/TargetInfo.h:1193
+  // the given cpu and returns `0` if the CPU is not found.
+  virtual unsigned getCPUCacheLineSize() const { return 0; }
+
----------------
Return an optional instead of using zero to mean "unknown"?


================
Comment at: clang/lib/Basic/Targets/X86.cpp:1840
+    case CK_Generic:
+    case CK_Penryn:
+      return 0;
----------------
All of the above (except generic) should be 64.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74918/new/

https://reviews.llvm.org/D74918





More information about the cfe-commits mailing list