[llvm] d05bd34 - [NFC][NewPM/Codegen] Remove unused parameter from verifyMachineFunction
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 14:15:39 PST 2024
Author: Arthur Eubanks
Date: 2024-02-07T22:15:09Z
New Revision: d05bd34a1814f7b60265207b1b805572f79aca6d
URL: https://github.com/llvm/llvm-project/commit/d05bd34a1814f7b60265207b1b805572f79aca6d
DIFF: https://github.com/llvm/llvm-project/commit/d05bd34a1814f7b60265207b1b805572f79aca6d.diff
LOG: [NFC][NewPM/Codegen] Remove unused parameter from verifyMachineFunction
The MachineFunctionAnalysisManager forward declaration is messing with upcoming changes.
Added:
Modified:
llvm/include/llvm/CodeGen/MachineFunction.h
llvm/lib/CodeGen/MachinePassManager.cpp
llvm/lib/CodeGen/MachineVerifier.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h
index 05c9b14a423cda..a2c90c9f42f38f 100644
--- a/llvm/include/llvm/CodeGen/MachineFunction.h
+++ b/llvm/include/llvm/CodeGen/MachineFunction.h
@@ -1423,9 +1423,7 @@ template <> struct GraphTraits<Inverse<const MachineFunction*>> :
}
};
-class MachineFunctionAnalysisManager;
-void verifyMachineFunction(MachineFunctionAnalysisManager *,
- const std::string &Banner,
+void verifyMachineFunction(const std::string &Banner,
const MachineFunction &MF);
} // end namespace llvm
diff --git a/llvm/lib/CodeGen/MachinePassManager.cpp b/llvm/lib/CodeGen/MachinePassManager.cpp
index 2d9b7980c10852..d42bbe239830f0 100644
--- a/llvm/lib/CodeGen/MachinePassManager.cpp
+++ b/llvm/lib/CodeGen/MachinePassManager.cpp
@@ -42,12 +42,12 @@ Error MachineFunctionPassManager::run(Module &M,
// No need to pop this callback later since MIR pipeline is flat which means
// current pipeline is the top-level pipeline. Callbacks are not used after
// current pipeline.
- PI.pushBeforeNonSkippedPassCallback([&MFAM](StringRef PassID, Any IR) {
+ PI.pushBeforeNonSkippedPassCallback([](StringRef PassID, Any IR) {
assert(llvm::any_cast<const MachineFunction *>(&IR));
const MachineFunction *MF = llvm::any_cast<const MachineFunction *>(IR);
assert(MF && "Machine function should be valid for printing");
std::string Banner = std::string("After ") + std::string(PassID);
- verifyMachineFunction(&MFAM, Banner, *MF);
+ verifyMachineFunction(Banner, *MF);
});
}
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index fe865ed6f8a0e5..c65e91741533c8 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -339,8 +339,7 @@ FunctionPass *llvm::createMachineVerifierPass(const std::string &Banner) {
return new MachineVerifierPass(Banner);
}
-void llvm::verifyMachineFunction(MachineFunctionAnalysisManager *,
- const std::string &Banner,
+void llvm::verifyMachineFunction(const std::string &Banner,
const MachineFunction &MF) {
// TODO: Use MFAM after porting below analyses.
// LiveVariables *LiveVars;
More information about the llvm-commits
mailing list