Skip to content

Commit 20eb60d

Browse files
authored
[NFC][LLVM] Cleanup pass initialization for wasm/LoongArch (#134452)
- Remove calls to pass initialization from pass constructors. - #111767
1 parent 80fde75 commit 20eb60d

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ class LoongArchExpandAtomicPseudo : public MachineFunctionPass {
3333
const LoongArchInstrInfo *TII;
3434
static char ID;
3535

36-
LoongArchExpandAtomicPseudo() : MachineFunctionPass(ID) {
37-
initializeLoongArchExpandAtomicPseudoPass(*PassRegistry::getPassRegistry());
38-
}
36+
LoongArchExpandAtomicPseudo() : MachineFunctionPass(ID) {}
3937

4038
bool runOnMachineFunction(MachineFunction &MF) override;
4139

llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ class LoongArchPreRAExpandPseudo : public MachineFunctionPass {
4141
const LoongArchInstrInfo *TII;
4242
static char ID;
4343

44-
LoongArchPreRAExpandPseudo() : MachineFunctionPass(ID) {
45-
initializeLoongArchPreRAExpandPseudoPass(*PassRegistry::getPassRegistry());
46-
}
44+
LoongArchPreRAExpandPseudo() : MachineFunctionPass(ID) {}
4745

4846
bool runOnMachineFunction(MachineFunction &MF) override;
4947

@@ -656,9 +654,7 @@ class LoongArchExpandPseudo : public MachineFunctionPass {
656654
const LoongArchInstrInfo *TII;
657655
static char ID;
658656

659-
LoongArchExpandPseudo() : MachineFunctionPass(ID) {
660-
initializeLoongArchExpandPseudoPass(*PassRegistry::getPassRegistry());
661-
}
657+
LoongArchExpandPseudo() : MachineFunctionPass(ID) {}
662658

663659
bool runOnMachineFunction(MachineFunction &MF) override;
664660

llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLoongArchTarget() {
4040
initializeLoongArchPreRAExpandPseudoPass(*PR);
4141
initializeLoongArchExpandPseudoPass(*PR);
4242
initializeLoongArchDAGToDAGISelLegacyPass(*PR);
43+
initializeLoongArchExpandAtomicPseudoPass(*PR);
4344
}
4445

4546
static cl::opt<bool> EnableLoongArchDeadRegisterElimination(

llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ class WebAssemblyExceptionInfo final : public MachineFunctionPass {
132132

133133
public:
134134
static char ID;
135-
WebAssemblyExceptionInfo() : MachineFunctionPass(ID) {
136-
initializeWebAssemblyExceptionInfoPass(*PassRegistry::getPassRegistry());
137-
}
135+
WebAssemblyExceptionInfo() : MachineFunctionPass(ID) {}
138136
~WebAssemblyExceptionInfo() override { releaseMemory(); }
139137
WebAssemblyExceptionInfo(const WebAssemblyExceptionInfo &) = delete;
140138
WebAssemblyExceptionInfo &

0 commit comments

Comments
 (0)