Skip to content

[NFC][LLVM] Cleanup pass initialization for wasm/LoongArch #134452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ class LoongArchExpandAtomicPseudo : public MachineFunctionPass {
const LoongArchInstrInfo *TII;
static char ID;

LoongArchExpandAtomicPseudo() : MachineFunctionPass(ID) {
initializeLoongArchExpandAtomicPseudoPass(*PassRegistry::getPassRegistry());
}
LoongArchExpandAtomicPseudo() : MachineFunctionPass(ID) {}

bool runOnMachineFunction(MachineFunction &MF) override;

Expand Down
8 changes: 2 additions & 6 deletions llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ class LoongArchPreRAExpandPseudo : public MachineFunctionPass {
const LoongArchInstrInfo *TII;
static char ID;

LoongArchPreRAExpandPseudo() : MachineFunctionPass(ID) {
initializeLoongArchPreRAExpandPseudoPass(*PassRegistry::getPassRegistry());
}
LoongArchPreRAExpandPseudo() : MachineFunctionPass(ID) {}

bool runOnMachineFunction(MachineFunction &MF) override;

Expand Down Expand Up @@ -656,9 +654,7 @@ class LoongArchExpandPseudo : public MachineFunctionPass {
const LoongArchInstrInfo *TII;
static char ID;

LoongArchExpandPseudo() : MachineFunctionPass(ID) {
initializeLoongArchExpandPseudoPass(*PassRegistry::getPassRegistry());
}
LoongArchExpandPseudo() : MachineFunctionPass(ID) {}

bool runOnMachineFunction(MachineFunction &MF) override;

Expand Down
1 change: 1 addition & 0 deletions llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLoongArchTarget() {
initializeLoongArchPreRAExpandPseudoPass(*PR);
initializeLoongArchExpandPseudoPass(*PR);
initializeLoongArchDAGToDAGISelLegacyPass(*PR);
initializeLoongArchExpandAtomicPseudoPass(*PR);
}

static cl::opt<bool> EnableLoongArchDeadRegisterElimination(
Expand Down
4 changes: 1 addition & 3 deletions llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ class WebAssemblyExceptionInfo final : public MachineFunctionPass {

public:
static char ID;
WebAssemblyExceptionInfo() : MachineFunctionPass(ID) {
initializeWebAssemblyExceptionInfoPass(*PassRegistry::getPassRegistry());
}
WebAssemblyExceptionInfo() : MachineFunctionPass(ID) {}
~WebAssemblyExceptionInfo() override { releaseMemory(); }
WebAssemblyExceptionInfo(const WebAssemblyExceptionInfo &) = delete;
WebAssemblyExceptionInfo &
Expand Down