[llvm] llvm-reduce: Don't print verifier failed machine functions (PR #109673)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 11:55:20 PDT 2024
================
@@ -94,21 +94,24 @@ using namespace llvm;
namespace {
struct MachineVerifier {
- MachineVerifier(MachineFunctionAnalysisManager &MFAM, const char *b)
- : MFAM(&MFAM), Banner(b) {}
+ MachineVerifier(MachineFunctionAnalysisManager &MFAM, const char *b,
+ raw_ostream *OS)
+ : MFAM(&MFAM), OS(OS ? OS : &nulls()), Banner(b) {}
- MachineVerifier(Pass *pass, const char *b) : PASS(pass), Banner(b) {}
+ MachineVerifier(Pass *pass, const char *b, raw_ostream *OS)
+ : PASS(pass), OS(OS ? OS : &nulls()), Banner(b) {}
MachineVerifier(const char *b, LiveVariables *LiveVars,
LiveIntervals *LiveInts, LiveStacks *LiveStks,
- SlotIndexes *Indexes)
- : Banner(b), LiveVars(LiveVars), LiveInts(LiveInts), LiveStks(LiveStks),
- Indexes(Indexes) {}
+ SlotIndexes *Indexes, raw_ostream *OS)
+ : OS(OS ? OS : &nulls()), Banner(b), LiveVars(LiveVars),
+ LiveInts(LiveInts), LiveStks(LiveStks), Indexes(Indexes) {}
unsigned verify(const MachineFunction &MF);
MachineFunctionAnalysisManager *MFAM = nullptr;
Pass *const PASS = nullptr;
+ raw_ostream *OS = nullptr;
----------------
arsenm wrote:
Yes. Originally I was going to add the null checks like the IR verifier does, but it got messy
https://github.com/llvm/llvm-project/pull/109673
More information about the llvm-commits
mailing list