-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[NFC][LLVM][SystemZ] Cleanup pass initialization for SystemZ #134450
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-systemz Author: Rahul Joshi (jurahul) Changes
Full diff: https://github.com/llvm/llvm-project/pull/134450.diff 7 Files Affected:
diff --git a/llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp b/llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp
index a6cf0f57aaf06..8867b6ea10931 100644
--- a/llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp
@@ -28,10 +28,7 @@ namespace {
class SystemZCopyPhysRegs : public MachineFunctionPass {
public:
static char ID;
- SystemZCopyPhysRegs()
- : MachineFunctionPass(ID), TII(nullptr), MRI(nullptr) {
- initializeSystemZCopyPhysRegsPass(*PassRegistry::getPassRegistry());
- }
+ SystemZCopyPhysRegs() : MachineFunctionPass(ID), TII(nullptr), MRI(nullptr) {}
bool runOnMachineFunction(MachineFunction &MF) override;
void getAnalysisUsage(AnalysisUsage &AU) const override;
diff --git a/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp b/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp
index 789365fb9e311..81f0014dd83f2 100644
--- a/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp
@@ -65,9 +65,7 @@ class SystemZElimCompare : public MachineFunctionPass {
public:
static char ID;
- SystemZElimCompare() : MachineFunctionPass(ID) {
- initializeSystemZElimComparePass(*PassRegistry::getPassRegistry());
- }
+ SystemZElimCompare() : MachineFunctionPass(ID) {}
bool processBlock(MachineBasicBlock &MBB);
bool runOnMachineFunction(MachineFunction &F) override;
diff --git a/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp b/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp
index 06df93a60709c..a81cfeb633603 100644
--- a/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp
@@ -28,9 +28,7 @@ namespace {
class SystemZLDCleanup : public MachineFunctionPass {
public:
static char ID;
- SystemZLDCleanup() : MachineFunctionPass(ID), TII(nullptr), MF(nullptr) {
- initializeSystemZLDCleanupPass(*PassRegistry::getPassRegistry());
- }
+ SystemZLDCleanup() : MachineFunctionPass(ID), TII(nullptr), MF(nullptr) {}
bool runOnMachineFunction(MachineFunction &MF) override;
void getAnalysisUsage(AnalysisUsage &AU) const override;
diff --git a/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp b/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
index f19b932f3c731..d50d7e419faeb 100644
--- a/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
@@ -135,9 +135,7 @@ class SystemZLongBranch : public MachineFunctionPass {
public:
static char ID;
- SystemZLongBranch() : MachineFunctionPass(ID) {
- initializeSystemZLongBranchPass(*PassRegistry::getPassRegistry());
- }
+ SystemZLongBranch() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &F) override;
diff --git a/llvm/lib/Target/SystemZ/SystemZPostRewrite.cpp b/llvm/lib/Target/SystemZ/SystemZPostRewrite.cpp
index ffeba87795625..8d4cee655235f 100644
--- a/llvm/lib/Target/SystemZ/SystemZPostRewrite.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZPostRewrite.cpp
@@ -32,9 +32,7 @@ namespace {
class SystemZPostRewrite : public MachineFunctionPass {
public:
static char ID;
- SystemZPostRewrite() : MachineFunctionPass(ID) {
- initializeSystemZPostRewritePass(*PassRegistry::getPassRegistry());
- }
+ SystemZPostRewrite() : MachineFunctionPass(ID) {}
const SystemZInstrInfo *TII;
diff --git a/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp b/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp
index c0adfdbf120bd..5d71c25348d95 100644
--- a/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp
@@ -60,9 +60,7 @@ FunctionPass *llvm::createSystemZShortenInstPass(SystemZTargetMachine &TM) {
}
SystemZShortenInst::SystemZShortenInst()
- : MachineFunctionPass(ID), TII(nullptr) {
- initializeSystemZShortenInstPass(*PassRegistry::getPassRegistry());
-}
+ : MachineFunctionPass(ID), TII(nullptr) {}
// Tie operands if MI has become a two-address instruction.
static void tieOpsIfNeeded(MachineInstr &MI) {
diff --git a/llvm/lib/Target/SystemZ/SystemZTDC.cpp b/llvm/lib/Target/SystemZ/SystemZTDC.cpp
index d5baa325951c2..1e254d694e392 100644
--- a/llvm/lib/Target/SystemZ/SystemZTDC.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZTDC.cpp
@@ -64,9 +64,7 @@ namespace {
class SystemZTDCPass : public FunctionPass {
public:
static char ID;
- SystemZTDCPass() : FunctionPass(ID) {
- initializeSystemZTDCPassPass(*PassRegistry::getPassRegistry());
- }
+ SystemZTDCPass() : FunctionPass(ID) {}
bool runOnFunction(Function &F) override;
|
uweigand
approved these changes
Apr 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
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.