[llvm] [CMAKE][llvm-libraries] Add Precompiled Headers option to improve build times (PR #91755)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 10 08:15:38 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff b2477765dbf9bd28bd2d1813c41ae12613f87717 62d6c3561de99659aad89e501e8f339b8ef0cc17 -- llvm/include/llvm/PrecompiledHeaders.h llvm/include/llvm/Demangle/ItaniumDemangle.h llvm/lib/BinaryFormat/Dwarf.cpp llvm/lib/BinaryFormat/MsgPackDocumentYAML.cpp llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp llvm/lib/Object/Minidump.cpp llvm/lib/ObjectYAML/MinidumpYAML.cpp llvm/lib/Remarks/Remark.cpp llvm/lib/Remarks/YAMLRemarkParser.cpp llvm/lib/Remarks/YAMLRemarkSerializer.cpp llvm/lib/TargetParser/X86TargetParser.cpp llvm/lib/TextAPI/TextStubV5.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/TargetParser/X86TargetParser.cpp b/llvm/lib/TargetParser/X86TargetParser.cpp
index c79f443c03..9bac00f8ba 100644
--- a/llvm/lib/TargetParser/X86TargetParser.cpp
+++ b/llvm/lib/TargetParser/X86TargetParser.cpp
@@ -66,15 +66,15 @@ constexpr X86FeatureBitset FeaturesNocona =
 
 // Basic 64-bit capable CPU.
 constexpr X86FeatureBitset FeaturesX86_64 = FeaturesPentium4 | Feature64BIT;
-constexpr X86FeatureBitset FeaturesX86_64_V2 = FeaturesX86_64 | FeatureSAHF |
-                                            FeaturePOPCNT | FeatureCRC32 |
-                                            FeatureSSE4_2 | FeatureCMPXCHG16B;
+constexpr X86FeatureBitset FeaturesX86_64_V2 =
+    FeaturesX86_64 | FeatureSAHF | FeaturePOPCNT | FeatureCRC32 |
+    FeatureSSE4_2 | FeatureCMPXCHG16B;
 constexpr X86FeatureBitset FeaturesX86_64_V3 =
     FeaturesX86_64_V2 | FeatureAVX2 | FeatureBMI | FeatureBMI2 | FeatureF16C |
     FeatureFMA | FeatureLZCNT | FeatureMOVBE | FeatureXSAVE;
-constexpr X86FeatureBitset FeaturesX86_64_V4 = FeaturesX86_64_V3 | FeatureEVEX512 |
-                                            FeatureAVX512BW | FeatureAVX512CD |
-                                            FeatureAVX512DQ | FeatureAVX512VL;
+constexpr X86FeatureBitset FeaturesX86_64_V4 =
+    FeaturesX86_64_V3 | FeatureEVEX512 | FeatureAVX512BW | FeatureAVX512CD |
+    FeatureAVX512DQ | FeatureAVX512VL;
 
 // Intel Core CPUs
 constexpr X86FeatureBitset FeaturesCore2 =
@@ -162,8 +162,9 @@ constexpr X86FeatureBitset FeaturesAlderlake =
 constexpr X86FeatureBitset FeaturesSierraforest =
     FeaturesAlderlake | FeatureCMPCCXADD | FeatureAVXIFMA | FeatureUINTR |
     FeatureENQCMD | FeatureAVXNECONVERT | FeatureAVXVNNIINT8;
-constexpr X86FeatureBitset FeaturesArrowlakeS = FeaturesSierraforest |
-    FeatureAVXVNNIINT16 | FeatureSHA512 | FeatureSM3 | FeatureSM4;
+constexpr X86FeatureBitset FeaturesArrowlakeS =
+    FeaturesSierraforest | FeatureAVXVNNIINT16 | FeatureSHA512 | FeatureSM3 |
+    FeatureSM4;
 constexpr X86FeatureBitset FeaturesPantherlake =
     FeaturesArrowlakeS | FeaturePREFETCHI;
 constexpr X86FeatureBitset FeaturesClearwaterforest =
@@ -174,7 +175,8 @@ constexpr X86FeatureBitset FeaturesGeode =
     FeatureX87 | FeatureCMPXCHG8B | FeatureMMX | Feature3DNOW | Feature3DNOWA;
 
 // K6 processor.
-constexpr X86FeatureBitset FeaturesK6 = FeatureX87 | FeatureCMPXCHG8B | FeatureMMX;
+constexpr X86FeatureBitset FeaturesK6 =
+    FeatureX87 | FeatureCMPXCHG8B | FeatureMMX;
 
 // K7 and K8 architecture processors.
 constexpr X86FeatureBitset FeaturesAthlon =
@@ -211,8 +213,8 @@ constexpr X86FeatureBitset FeaturesBDVER2 =
 constexpr X86FeatureBitset FeaturesBDVER3 =
     FeaturesBDVER2 | FeatureFSGSBASE | FeatureXSAVEOPT;
 constexpr X86FeatureBitset FeaturesBDVER4 = FeaturesBDVER3 | FeatureAVX2 |
-                                         FeatureBMI2 | FeatureMOVBE |
-                                         FeatureMWAITX | FeatureRDRND;
+                                            FeatureBMI2 | FeatureMOVBE |
+                                            FeatureMWAITX | FeatureRDRND;
 
 // AMD Zen architecture processors.
 constexpr X86FeatureBitset FeaturesZNVER1 =
@@ -226,11 +228,11 @@ constexpr X86FeatureBitset FeaturesZNVER1 =
     FeatureSSE4_2 | FeatureSSE4_A | FeatureXSAVE | FeatureXSAVEC |
     FeatureXSAVEOPT | FeatureXSAVES;
 constexpr X86FeatureBitset FeaturesZNVER2 = FeaturesZNVER1 | FeatureCLWB |
-                                         FeatureRDPID | FeatureRDPRU |
-                                         FeatureWBNOINVD;
-static constexpr X86FeatureBitset FeaturesZNVER3 = FeaturesZNVER2 |
-                                                FeatureINVPCID | FeaturePKU |
-                                                FeatureVAES | FeatureVPCLMULQDQ;
+                                            FeatureRDPID | FeatureRDPRU |
+                                            FeatureWBNOINVD;
+static constexpr X86FeatureBitset FeaturesZNVER3 =
+    FeaturesZNVER2 | FeatureINVPCID | FeaturePKU | FeatureVAES |
+    FeatureVPCLMULQDQ;
 static constexpr X86FeatureBitset FeaturesZNVER4 =
     FeaturesZNVER3 | FeatureAVX512F | FeatureEVEX512 | FeatureAVX512CD |
     FeatureAVX512DQ | FeatureAVX512BW | FeatureAVX512VL | FeatureAVX512IFMA |
@@ -561,7 +563,8 @@ constexpr X86FeatureBitset ImpliedFeaturesGFNI = FeatureSSE2;
 constexpr X86FeatureBitset ImpliedFeaturesPCLMUL = FeatureSSE2;
 constexpr X86FeatureBitset ImpliedFeaturesSHA = FeatureSSE2;
 constexpr X86FeatureBitset ImpliedFeaturesVAES = FeatureAES | FeatureAVX2;
-constexpr X86FeatureBitset ImpliedFeaturesVPCLMULQDQ = FeatureAVX | FeaturePCLMUL;
+constexpr X86FeatureBitset ImpliedFeaturesVPCLMULQDQ =
+    FeatureAVX | FeaturePCLMUL;
 constexpr X86FeatureBitset ImpliedFeaturesSM3 = FeatureAVX;
 constexpr X86FeatureBitset ImpliedFeaturesSM4 = FeatureAVX2;
 

``````````

</details>


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


More information about the llvm-commits mailing list