[clang] [llvm] Split fmv and extensions (PR #92882)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 01:51:45 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 ee76f1e1b7ee4585b8d5ead27c317abbc2cdf4b7 a41cd9fa5a63fd5dd22735560ca4fae12d178fe6 -- clang/lib/Basic/Targets/AArch64.cpp clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/Targets/AArch64.cpp clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_fmlas16.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_mopa_nonwide.c clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_revd.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfclamp.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmla_lane.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmls_lane.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmlsl.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmul_lane.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_cntp.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_create2_bool.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_create4_bool.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_dot.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_dupq.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_extq.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_fclamp.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_fp_reduce.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_get2_bool.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_get4_bool.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_int_reduce.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_ld1.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_ld1_single.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_ldnt1.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_loads.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_pext.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_pfalse.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_pmov_to_pred.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_pmov_to_vector.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_psel.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_psel_svcount.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_ptrue.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_qcvtn.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_qrshr.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_sclamp.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_set2_bool.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_set4_bool.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_st1.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_st1_single.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_stnt1.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_store.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_tblq.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_tbxq.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_uclamp.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_undef_bool.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_uzpq1.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_uzpq2.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_pn.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_x2.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_zipq1.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_zipq2.c clang/test/Sema/aarch64-sme2p1-diagnostics.c clang/test/Sema/aarch64-sve2p1-intrinsics/acle_sve2p1_imm.cpp llvm/include/llvm/TargetParser/AArch64TargetParser.h llvm/lib/TargetParser/AArch64TargetParser.cpp llvm/utils/TableGen/ARMTargetDefEmitter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/TargetParser/AArch64TargetParser.h b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
index 7875f7e166..eef5cf24e5 100644
--- a/llvm/include/llvm/TargetParser/AArch64TargetParser.h
+++ b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
@@ -125,18 +125,17 @@ struct ExtensionInfo {
#define EMIT_EXTENSIONS
#include "llvm/TargetParser/AArch64TargetParserDef.inc"
-
struct FMVInfo {
- StringRef Name; // The target_version/target_clones spelling.
- CPUFeatures Bit; // Index of the bit in the FMV feature bitset.
- StringRef Features; // List of SubtargetFeatures to enable.
- unsigned Priority; // FMV priority.
+ StringRef Name; // The target_version/target_clones spelling.
+ CPUFeatures Bit; // Index of the bit in the FMV feature bitset.
+ StringRef Features; // List of SubtargetFeatures to enable.
+ unsigned Priority; // FMV priority.
FMVInfo(StringRef Name, CPUFeatures Bit, StringRef Features,
unsigned Priority)
- : Name(Name), Bit(Bit), Features(Features), Priority(Priority){};
+ : Name(Name), Bit(Bit), Features(Features), Priority(Priority) {};
};
-const std::vector<FMVInfo>& getFMVInfo();
+const std::vector<FMVInfo> &getFMVInfo();
struct ExtensionSet {
// Set of extensions which are currently enabled.
diff --git a/llvm/lib/TargetParser/AArch64TargetParser.cpp b/llvm/lib/TargetParser/AArch64TargetParser.cpp
index d152922216..103cac36c6 100644
--- a/llvm/lib/TargetParser/AArch64TargetParser.cpp
+++ b/llvm/lib/TargetParser/AArch64TargetParser.cpp
@@ -125,8 +125,7 @@ AArch64::parseArchExtension(StringRef ArchExt) {
return {};
}
-std::optional<AArch64::FMVInfo>
-AArch64::parseFMVExtension(StringRef FMVExt) {
+std::optional<AArch64::FMVInfo> AArch64::parseFMVExtension(StringRef FMVExt) {
// FIXME introduce general alias functionality, or remove this exception.
if (FMVExt == "rmda")
FMVExt = "rdm";
diff --git a/llvm/utils/TableGen/ARMTargetDefEmitter.cpp b/llvm/utils/TableGen/ARMTargetDefEmitter.cpp
index dd4f929f05..e0306df965 100644
--- a/llvm/utils/TableGen/ARMTargetDefEmitter.cpp
+++ b/llvm/utils/TableGen/ARMTargetDefEmitter.cpp
@@ -110,7 +110,8 @@ static void EmitARMTargetDef(RecordKeeper &RK, raw_ostream &OS) {
// Emit FMV information
auto FMVExts = RK.getAllDerivedDefinitionsIfDefined("FMVExtension");
OS << "#ifdef EMIT_FMV_INFO\n"
- << "const std::vector<llvm::AArch64::FMVInfo>& llvm::AArch64::getFMVInfo() {\n"
+ << "const std::vector<llvm::AArch64::FMVInfo>& "
+ "llvm::AArch64::getFMVInfo() {\n"
<< " static std::vector<FMVInfo> I;\n"
<< " if(I.size()) return I;\n"
<< " I.reserve(" << FMVExts.size() << ");\n";
``````````
</details>
https://github.com/llvm/llvm-project/pull/92882
More information about the llvm-commits
mailing list