Skip to content

Commit

Permalink
[Target] Apply clang-tidy fixes for readability-redundant-member-init…
Browse files Browse the repository at this point in the history
… (NFC)
  • Loading branch information
kazutakahirata committed Mar 28, 2022
1 parent 23b3df5 commit 6212871
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 17 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

using namespace llvm;

AArch64RegisterBankInfo::AArch64RegisterBankInfo(const TargetRegisterInfo &TRI)
: AArch64GenRegisterBankInfo() {
AArch64RegisterBankInfo::AArch64RegisterBankInfo(
const TargetRegisterInfo &TRI) {
static llvm::once_flag InitializeRegisterBankFlag;

static auto InitializeRegisterBankOnce = [&]() {
Expand Down
4 changes: 1 addition & 3 deletions llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,7 @@ class ApplyRegBankMapping final : public GISelChangeObserver {

}
AMDGPURegisterBankInfo::AMDGPURegisterBankInfo(const GCNSubtarget &ST)
: AMDGPUGenRegisterBankInfo(),
Subtarget(ST),
TRI(Subtarget.getRegisterInfo()),
: Subtarget(ST), TRI(Subtarget.getRegisterInfo()),
TII(Subtarget.getInstrInfo()) {

// HACK: Until this is fully tablegen'd.
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Target/ARM/ARMRegisterBankInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ static void checkValueMappings() {
} // end namespace arm
} // end namespace llvm

ARMRegisterBankInfo::ARMRegisterBankInfo(const TargetRegisterInfo &TRI)
: ARMGenRegisterBankInfo() {
ARMRegisterBankInfo::ARMRegisterBankInfo(const TargetRegisterInfo &TRI) {
// We have only one set of register banks, whatever the subtarget
// is. Therefore, the initialization of the RegBanks table should be
// done only once. Indeed the table of all register banks
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ struct WeightedLeaf {
int Weight;
int InsertionOrder;

WeightedLeaf() : Value(SDValue()) { }
WeightedLeaf() {}

WeightedLeaf(SDValue Value, int Weight, int InsertionOrder) :
Value(Value), Weight(Weight), InsertionOrder(InsertionOrder) {
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ RegisterBankInfo::ValueMapping ValueMappings[] = {

using namespace llvm;

MipsRegisterBankInfo::MipsRegisterBankInfo(const TargetRegisterInfo &TRI)
: MipsGenRegisterBankInfo() {}
MipsRegisterBankInfo::MipsRegisterBankInfo(const TargetRegisterInfo &TRI) {}

const RegisterBank &
MipsRegisterBankInfo::getRegBankFromRegClass(const TargetRegisterClass &RC,
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using namespace llvm;
// Pin the vtable to this file.
void NVPTXInstrInfo::anchor() {}

NVPTXInstrInfo::NVPTXInstrInfo() : NVPTXGenInstrInfo(), RegInfo() {}
NVPTXInstrInfo::NVPTXInstrInfo() : RegInfo() {}

void NVPTXInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
MachineBasicBlock::iterator I,
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Target/PowerPC/GISel/PPCRegisterBankInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@

using namespace llvm;

PPCRegisterBankInfo::PPCRegisterBankInfo(const TargetRegisterInfo &TRI)
: PPCGenRegisterBankInfo() {}
PPCRegisterBankInfo::PPCRegisterBankInfo(const TargetRegisterInfo &TRI) {}
3 changes: 1 addition & 2 deletions llvm/lib/Target/RISCV/RISCVRegisterBankInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@

using namespace llvm;

RISCVRegisterBankInfo::RISCVRegisterBankInfo(const TargetRegisterInfo &TRI)
: RISCVGenRegisterBankInfo() {}
RISCVRegisterBankInfo::RISCVRegisterBankInfo(const TargetRegisterInfo &TRI) {}
3 changes: 1 addition & 2 deletions llvm/lib/Target/X86/X86RegisterBankInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ using namespace llvm;
#define GET_TARGET_REGBANK_INFO_IMPL
#include "X86GenRegisterBankInfo.def"

X86RegisterBankInfo::X86RegisterBankInfo(const TargetRegisterInfo &TRI)
: X86GenRegisterBankInfo() {
X86RegisterBankInfo::X86RegisterBankInfo(const TargetRegisterInfo &TRI) {

// validate RegBank initialization.
const RegisterBank &RBGPR = getRegBank(X86::GPRRegBankID);
Expand Down

0 comments on commit 6212871

Please sign in to comment.