Skip to content

llvm-reduce: Don't print verifier failed machine functions #109673

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions llvm/include/llvm/CodeGen/MachineFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -897,13 +897,14 @@ class LLVM_ABI MachineFunction {
/// for debugger use.
/// \returns true if no problems were found.
bool verify(Pass *p = nullptr, const char *Banner = nullptr,
bool AbortOnError = true) const;
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.
bool verify(LiveIntervals *LiveInts, SlotIndexes *Indexes,
const char *Banner = nullptr, bool AbortOnError = true) const;
const char *Banner = nullptr, raw_ostream *OS = nullptr,
bool AbortOnError = true) const;

// Provide accessors for the MachineBasicBlock list...
using iterator = BasicBlockListType::iterator;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/MIRParser/MIRParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ MIRParserImpl::initializeMachineFunction(const yaml::MachineFunction &YamlMF,

MF.getSubtarget().mirFileLoaded(MF);

MF.verify();
MF.verify(nullptr, nullptr, &errs());
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/MachineBlockPlacement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3698,7 +3698,7 @@ void MachineBlockPlacement::assignBlockOrder(

#ifndef NDEBUG
// Make sure we correctly constructed all branches.
F->verify(this, "After optimized block reordering");
F->verify(this, "After optimized block reordering", &errs());
#endif
}

Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/CodeGen/MachineScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ bool MachineScheduler::runOnMachineFunction(MachineFunction &mf) {

if (VerifyScheduling) {
LLVM_DEBUG(LIS->dump());
MF->verify(this, "Before machine scheduling.");
MF->verify(this, "Before machine scheduling.", &errs());
}
RegClassInfo->runOnMachineFunction(*MF);

Expand All @@ -472,7 +472,7 @@ bool MachineScheduler::runOnMachineFunction(MachineFunction &mf) {

LLVM_DEBUG(LIS->dump());
if (VerifyScheduling)
MF->verify(this, "After machine scheduling.");
MF->verify(this, "After machine scheduling.", &errs());
return true;
}

Expand All @@ -496,7 +496,7 @@ bool PostMachineScheduler::runOnMachineFunction(MachineFunction &mf) {
AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();

if (VerifyScheduling)
MF->verify(this, "Before post machine scheduling.");
MF->verify(this, "Before post machine scheduling.", &errs());

// Instantiate the selected scheduler for this target, function, and
// optimization level.
Expand All @@ -512,7 +512,7 @@ bool PostMachineScheduler::runOnMachineFunction(MachineFunction &mf) {
scheduleRegions(*Scheduler, true);

if (VerifyScheduling)
MF->verify(this, "After post machine scheduling.");
MF->verify(this, "After post machine scheduling.", &errs());
return true;
}

Expand Down
Loading
Loading