File indexing completed on 2026-05-10 08:43:32
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef LLVM_CODEGEN_MIRPRINTER_H
0015 #define LLVM_CODEGEN_MIRPRINTER_H
0016
0017 #include "llvm/CodeGen/MachinePassManager.h"
0018 #include "llvm/Support/raw_ostream.h"
0019
0020 namespace llvm {
0021
0022 class MachineBasicBlock;
0023 class MachineFunction;
0024 class MachineModuleInfo;
0025 class Module;
0026 template <typename T> class SmallVectorImpl;
0027
0028 class PrintMIRPreparePass : public PassInfoMixin<PrintMIRPreparePass> {
0029 raw_ostream &OS;
0030
0031 public:
0032 PrintMIRPreparePass(raw_ostream &OS = errs()) : OS(OS) {}
0033 PreservedAnalyses run(Module &M, ModuleAnalysisManager &MFAM);
0034 static bool isRequired() { return true; }
0035 };
0036
0037 class PrintMIRPass : public PassInfoMixin<PrintMIRPass> {
0038 raw_ostream &OS;
0039
0040 public:
0041 PrintMIRPass(raw_ostream &OS = errs()) : OS(OS) {}
0042 PreservedAnalyses run(MachineFunction &MF,
0043 MachineFunctionAnalysisManager &MFAM);
0044 static bool isRequired() { return true; }
0045 };
0046
0047
0048 void printMIR(raw_ostream &OS, const Module &M);
0049
0050
0051
0052 void printMIR(raw_ostream &OS, const MachineModuleInfo &MMI,
0053 const MachineFunction &MF);
0054
0055
0056
0057
0058
0059
0060
0061
0062 void guessSuccessors(const MachineBasicBlock &MBB,
0063 SmallVectorImpl<MachineBasicBlock*> &Result,
0064 bool &IsFallthrough);
0065
0066 }
0067
0068 #endif