Skip to content

Commit b3b8559

Browse files
cdevadasIcohedron
authored andcommitted
[MachineVerifier][NewPM] Add method to run MF through verifier. (llvm#125701)
1 parent c082a6d commit b3b8559

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

llvm/include/llvm/CodeGen/MachineFunction.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,13 @@ class LLVM_ABI MachineFunction {
918918
bool verify(Pass *p = nullptr, const char *Banner = nullptr,
919919
raw_ostream *OS = nullptr, bool AbortOnError = true) const;
920920

921+
/// For New Pass Manager: Run the current MachineFunction through the machine
922+
/// code verifier, useful for debugger use.
923+
/// \returns true if no problems were found.
924+
bool verify(MachineFunctionAnalysisManager &MFAM,
925+
const char *Banner = nullptr, raw_ostream *OS = nullptr,
926+
bool AbortOnError = true) const;
927+
921928
/// Run the current MachineFunction through the machine code verifier, useful
922929
/// for debugger use.
923930
/// \returns true if no problems were found.

llvm/lib/CodeGen/MachineVerifier.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,12 @@ bool MachineFunction::verify(Pass *p, const char *Banner, raw_ostream *OS,
431431
return MachineVerifier(p, Banner, OS, AbortOnError).verify(*this);
432432
}
433433

434+
bool MachineFunction::verify(MachineFunctionAnalysisManager &MFAM,
435+
const char *Banner, raw_ostream *OS,
436+
bool AbortOnError) const {
437+
return MachineVerifier(MFAM, Banner, OS, AbortOnError).verify(*this);
438+
}
439+
434440
bool MachineFunction::verify(LiveIntervals *LiveInts, SlotIndexes *Indexes,
435441
const char *Banner, raw_ostream *OS,
436442
bool AbortOnError) const {

0 commit comments

Comments
 (0)