[llvm] 1d22318 - [MachineVerifier][NewPM] Add method to run MF through verifier. (#125701)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 22:24:30 PST 2025
Author: Christudasan Devadasan
Date: 2025-02-05T11:54:26+05:30
New Revision: 1d22318b81b24817d2887adc6c3e586fdcf3a100
URL: https://github.com/llvm/llvm-project/commit/1d22318b81b24817d2887adc6c3e586fdcf3a100
DIFF: https://github.com/llvm/llvm-project/commit/1d22318b81b24817d2887adc6c3e586fdcf3a100.diff
LOG: [MachineVerifier][NewPM] Add method to run MF through verifier. (#125701)
Added:
Modified:
llvm/include/llvm/CodeGen/MachineFunction.h
llvm/lib/CodeGen/MachineVerifier.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h
index c3eb27b9462879..f1e595cde54e31 100644
--- a/llvm/include/llvm/CodeGen/MachineFunction.h
+++ b/llvm/include/llvm/CodeGen/MachineFunction.h
@@ -918,6 +918,13 @@ class LLVM_ABI MachineFunction {
bool verify(Pass *p = nullptr, const char *Banner = nullptr,
raw_ostream *OS = nullptr, bool AbortOnError = true) const;
+ /// For New Pass Manager: Run the current MachineFunction through the machine
+ /// code verifier, useful for debugger use.
+ /// \returns true if no problems were found.
+ bool verify(MachineFunctionAnalysisManager &MFAM,
+ const char *Banner = nullptr, raw_ostream *OS = nullptr,
+ bool AbortOnError = true) const;
+
/// Run the current MachineFunction through the machine code verifier, useful
/// for debugger use.
/// \returns true if no problems were found.
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index 8509369fe09c8f..05afcbee701a80 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -431,6 +431,12 @@ bool MachineFunction::verify(Pass *p, const char *Banner, raw_ostream *OS,
return MachineVerifier(p, Banner, OS, AbortOnError).verify(*this);
}
+bool MachineFunction::verify(MachineFunctionAnalysisManager &MFAM,
+ const char *Banner, raw_ostream *OS,
+ bool AbortOnError) const {
+ return MachineVerifier(MFAM, Banner, OS, AbortOnError).verify(*this);
+}
+
bool MachineFunction::verify(LiveIntervals *LiveInts, SlotIndexes *Indexes,
const char *Banner, raw_ostream *OS,
bool AbortOnError) const {
More information about the llvm-commits
mailing list