[llvm] [GISel] Make target's PartMapping, ValueMapping, and BankIDToCopyMapIdx arrays const. (PR #71079)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 09:54:04 PDT 2023
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 7d039effc4930be9240446a4241d268a39960e0b e012e48e3dc55605f9161be67bb3d45cab0cf911 -- llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.h llvm/lib/Target/ARM/ARMRegisterBankInfo.cpp llvm/lib/Target/M68k/GISel/M68kRegisterBankInfo.cpp llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp llvm/lib/Target/PowerPC/GISel/PPCRegisterBankInfo.h llvm/lib/Target/RISCV/GISel/RISCVRegisterBankInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp b/llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp
index b38ca3f09..440611c70 100644
--- a/llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp
+++ b/llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp
@@ -32,12 +32,10 @@ enum PartialMappingIdx {
PMI_Min = PMI_GPR,
};
-const RegisterBankInfo::PartialMapping PartMappings[]{
- {0, 32, GPRBRegBank},
- {0, 32, FPRBRegBank},
- {0, 64, FPRBRegBank},
- {0, 128, FPRBRegBank}
-};
+const RegisterBankInfo::PartialMapping PartMappings[]{{0, 32, GPRBRegBank},
+ {0, 32, FPRBRegBank},
+ {0, 64, FPRBRegBank},
+ {0, 128, FPRBRegBank}};
enum ValueMappingIdx {
InvalidIdx = 0,
@@ -65,8 +63,7 @@ const RegisterBankInfo::ValueMapping ValueMappings[] = {
// up to 3 operands in FPRs - MSA
{&PartMappings[PMI_MSA - PMI_Min], 1},
{&PartMappings[PMI_MSA - PMI_Min], 1},
- {&PartMappings[PMI_MSA - PMI_Min], 1}
-};
+ {&PartMappings[PMI_MSA - PMI_Min], 1}};
} // end namespace Mips
} // end namespace llvm
``````````
</details>
https://github.com/llvm/llvm-project/pull/71079
More information about the llvm-commits
mailing list