LLVM 20.0.0git
Classes | Namespaces | Functions | Variables
MIRPrinter.cpp File Reference
#include "llvm/CodeGen/MIRPrinter.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/CodeGen/MIRYamlMapping.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineModuleSlotTracker.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/CodeGenTypes/LowLevelType.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ModuleSlotTracker.h"
#include "llvm/IR/Value.h"
#include "llvm/MC/LaneBitmask.h"
#include "llvm/Support/BranchProbability.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include <algorithm>
#include <cassert>
#include <cinttypes>
#include <cstdint>
#include <iterator>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  llvm::MIRPrinter
 This class prints out the machine functions using the MIR serialization format. More...
 
class  llvm::MIPrinter
 This class prints out the machine instructions using the MIR serialization format. More...
 
struct  llvm::yaml::BlockScalarTraits< Module >
 This struct serializes the LLVM IR module. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::yaml
 

Functions

static void printRegMIR (unsigned Reg, yaml::StringValue &Dest, const TargetRegisterInfo *TRI)
 
static void printCustomRegMask (const uint32_t *RegMask, raw_ostream &OS, const TargetRegisterInfo *TRI)
 
static void printRegClassOrBank (unsigned Reg, yaml::StringValue &Dest, const MachineRegisterInfo &RegInfo, const TargetRegisterInfo *TRI)
 
template<typename T >
static void printStackObjectDbgInfo (const MachineFunction::VariableDbgInfo &DebugVar, T &Object, ModuleSlotTracker &MST)
 
static void printRegFlags (Register Reg, std::vector< yaml::FlowStringValue > &RegisterFlags, const MachineFunction &MF, const TargetRegisterInfo *TRI)
 
static std::string formatOperandComment (std::string Comment)
 

Variables

static cl::opt< boolSimplifyMIR ("simplify-mir", cl::Hidden, cl::desc("Leave out unnecessary information when printing MIR"))
 
static cl::opt< boolPrintLocations ("mir-debug-loc", cl::Hidden, cl::init(true), cl::desc("Print MIR debug-locations"))
 
cl::opt< boolWriteNewDbgInfoFormat
 

Function Documentation

◆ formatOperandComment()

static std::string formatOperandComment ( std::string  Comment)
static

Definition at line 939 of file MIRPrinter.cpp.

Referenced by llvm::MIPrinter::print().

◆ printCustomRegMask()

static void printCustomRegMask ( const uint32_t RegMask,
raw_ostream OS,
const TargetRegisterInfo TRI 
)
static

Definition at line 278 of file MIRPrinter.cpp.

References assert(), I, OS, llvm::printReg(), and TRI.

Referenced by llvm::MIPrinter::print().

◆ printRegClassOrBank()

static void printRegClassOrBank ( unsigned  Reg,
yaml::StringValue Dest,
const MachineRegisterInfo RegInfo,
const TargetRegisterInfo TRI 
)
static

Definition at line 297 of file MIRPrinter.cpp.

References OS, llvm::printRegClassOrBank(), TRI, and llvm::yaml::StringValue::Value.

◆ printRegFlags()

static void printRegFlags ( Register  Reg,
std::vector< yaml::FlowStringValue > &  RegisterFlags,
const MachineFunction MF,
const TargetRegisterInfo TRI 
)
static

Definition at line 320 of file MIRPrinter.cpp.

References TRI.

Referenced by llvm::MIRPrinter::convert().

◆ printRegMIR()

static void printRegMIR ( unsigned  Reg,
yaml::StringValue Dest,
const TargetRegisterInfo TRI 
)
static

◆ printStackObjectDbgInfo()

template<typename T >
static void printStackObjectDbgInfo ( const MachineFunction::VariableDbgInfo DebugVar,
T Object,
ModuleSlotTracker MST 
)
static

Variable Documentation

◆ PrintLocations

cl::opt< bool > PrintLocations("mir-debug-loc", cl::Hidden, cl::init(true), cl::desc("Print MIR debug-locations")) ( "mir-debug-loc"  ,
cl::Hidden  ,
cl::init(true ,
cl::desc("Print MIR debug-locations")   
)
static

Referenced by llvm::MIPrinter::print().

◆ SimplifyMIR

cl::opt< bool > SimplifyMIR("simplify-mir", cl::Hidden, cl::desc("Leave out unnecessary information when printing MIR")) ( "simplify-mir"  ,
cl::Hidden  ,
cl::desc("Leave out unnecessary information when printing MIR")   
)
static

◆ WriteNewDbgInfoFormat

cl::opt<bool> WriteNewDbgInfoFormat
extern