-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Remove calls to pass initialization from pass constructors.
@llvm/pr-subscribers-backend-loongarch Author: Rahul Joshi (jurahul) Changes
Full diff: https://github.com/llvm/llvm-project/pull/134452.diff 4 Files Affected:
diff --git a/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp b/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
index 79f37a0f548c6..27d20390eb6ae 100644
--- a/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
@@ -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;
diff --git a/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp b/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
index c2d73a260b1c1..9e9c65a041bf7 100644
--- a/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
@@ -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;
@@ -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;
diff --git a/llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp b/llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
index 692392dc2bae0..dc490e8185504 100644
--- a/llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
@@ -40,6 +40,7 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLoongArchTarget() {
initializeLoongArchPreRAExpandPseudoPass(*PR);
initializeLoongArchExpandPseudoPass(*PR);
initializeLoongArchDAGToDAGISelLegacyPass(*PR);
+ initializeLoongArchExpandAtomicPseudoPass(*PR);
}
static cl::opt<bool> EnableLoongArchDeadRegisterElimination(
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h
index 832ef1e49d784..7845cdfaebec7 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h
@@ -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 &
|
@llvm/pr-subscribers-backend-webassembly Author: Rahul Joshi (jurahul) Changes
Full diff: https://github.com/llvm/llvm-project/pull/134452.diff 4 Files Affected:
diff --git a/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp b/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
index 79f37a0f548c6..27d20390eb6ae 100644
--- a/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
@@ -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;
diff --git a/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp b/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
index c2d73a260b1c1..9e9c65a041bf7 100644
--- a/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
@@ -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;
@@ -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;
diff --git a/llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp b/llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
index 692392dc2bae0..dc490e8185504 100644
--- a/llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
@@ -40,6 +40,7 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLoongArchTarget() {
initializeLoongArchPreRAExpandPseudoPass(*PR);
initializeLoongArchExpandPseudoPass(*PR);
initializeLoongArchDAGToDAGISelLegacyPass(*PR);
+ initializeLoongArchExpandAtomicPseudoPass(*PR);
}
static cl::opt<bool> EnableLoongArchDeadRegisterElimination(
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h
index 832ef1e49d784..7845cdfaebec7 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h
@@ -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 &
|
dschuff
approved these changes
Apr 5, 2025
heiher
approved these changes
Apr 7, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.