[PATCH] D82731: [X86] Move frontend CPU feature initialization to a look up table based implementation.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 01:02:41 PDT 2020


RKSimon added a comment.

LGTM with a couple of minors



================
Comment at: clang/test/Preprocessor/predefined-arch-macros.c:2835
 // CHECK_ZNVER1_M32: #define __F16C__ 1
+// CHECK_ZNVER1_M32-NOT: #define __FMA4__ 1
 // CHECK_ZNVER1_M32: #define __FMA__ 1
----------------
The additional znver -NOT checks should definitely be split out.


================
Comment at: llvm/lib/Support/X86TargetParser.cpp:179
+static constexpr FeatureBitset FeaturesGeode =
+    FeaturesPentiumMMX | Feature3DNOW | Feature3DNOWA;
+
----------------
Maybe don't make this dependent on PentiumMMX?

FeatureX87 | FeatureCMPXCHG8B | FeatureMMX | Feature3DNOW | Feature3DNOWA


================
Comment at: llvm/lib/Support/X86TargetParser.cpp:312
   // K6 architecture processors.
-  { {"k6"}, CK_K6, ~0U, PROC_32_BIT },
-  { {"k6-2"}, CK_K6_2, ~0U, PROC_32_BIT },
-  { {"k6-3"}, CK_K6_3, ~0U, PROC_32_BIT },
+  { {"k6"}, CK_K6, ~0U, FeaturesPentiumMMX },
+  { {"k6-2"}, CK_K6_2, ~0U, FeaturesPentiumMMX | Feature3DNOW },
----------------
Maybe create a FeaturesK6 and build k6-2/3 off that?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82731





More information about the llvm-commits mailing list