Go to the documentation of this file.
13 #ifndef LLVM_CODEGEN_MIRPARSER_MIPARSER_H
14 #define LLVM_CODEGEN_MIRPARSER_MIPARSER_H
26 class MachineBasicBlock;
27 class MachineFunction;
34 class TargetRegisterClass;
35 class TargetSubtargetInfo;
87 void initNames2InstrOpCodes();
88 void initNames2Regs();
89 void initNames2RegMasks();
90 void initNames2SubRegIndices();
91 void initNames2TargetIndices();
92 void initNames2DirectTargetFlags();
93 void initNames2BitmaskTargetFlags();
94 void initNames2MMOTargetFlags();
96 void initNames2RegClasses();
97 void initNames2RegBanks();
153 initNames2RegClasses();
154 initNames2RegBanks();
246 #endif // LLVM_CODEGEN_MIRPARSER_MIPARSER_H
This is an optimization pass for GlobalISel generic memory operations.
const RegisterBank * RegBank
const RegisterBank * getRegBank(StringRef Name)
Check if the given identifier is a name of a register bank.
Target - Wrapper for Target specific information.
DenseMap< unsigned, int > StackObjectSlots
enum llvm::VRegInfo::uint8_t Kind
PerFunctionMIParsingState(MachineFunction &MF, SourceMgr &SM, const SlotMapping &IRSlots, PerTargetMIParsingState &Target)
Reg
All possible values of the reg field in the ModR/M byte.
DenseMap< unsigned, int > FixedStackObjectSlots
bool parseMachineInstructions(PerFunctionMIParsingState &PFS, StringRef Src, SMDiagnostic &Error)
Parse the machine instructions.
StringMap< VRegInfo * > VRegInfosNamed
VRegInfo & getVRegInfoNamed(StringRef RegName)
bool getMMOTargetFlag(StringRef Name, MachineMemOperand::Flags &Flag)
Try to convert a name of a MachineMemOperand target flag to the corresponding target flag.
const TargetRegisterClass * RC
bool parseMachineBasicBlockDefinitions(PerFunctionMIParsingState &PFS, StringRef Src, SMDiagnostic &Error)
Parse the machine basic block definitions, and skip the machine instructions.
bool parseInstrName(StringRef InstrName, unsigned &OpCode)
Try to convert an instruction name to an opcode.
BumpPtrAllocator Allocator
DenseMap< unsigned, unsigned > JumpTableSlots
bool parseStackObjectReference(PerFunctionMIParsingState &PFS, int &FI, StringRef Src, SMDiagnostic &Error)
bool parseMDNode(PerFunctionMIParsingState &PFS, MDNode *&Node, StringRef Src, SMDiagnostic &Error)
This class implements the register bank concept.
const SlotMapping & IRSlots
bool getTargetIndex(StringRef Name, int &Index)
Try to convert a name of target index to the corresponding target index.
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...
Flag
These should be considered private to the implementation of the MCInstrDesc class.
Analysis containing CSE Info
const TargetRegisterClass * getRegClass(StringRef Name)
Check if the given identifier is a name of a register class.
DenseMap< Register, VRegInfo * > VRegInfos
const Value * getIRValue(unsigned Slot)
This struct contains the mappings from the slot numbers to unnamed metadata nodes,...
bool parseMachineMetadata(PerFunctionMIParsingState &PFS, StringRef Src, SMRange SourceRange, SMDiagnostic &Error)
VRegInfo & getVRegInfo(Register Num)
std::map< unsigned, std::pair< TempMDTuple, SMLoc > > MachineForwardRefMDNodes
Allocate memory in an ever growing pool, as if by bump-pointer.
Flags
Flags values. These may be or'd together.
bool getRegisterByName(StringRef RegName, Register &Reg)
Try to convert a register name to a register number.
StringRef - Represent a constant reference to a string, i.e.
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
std::map< unsigned, TrackingMDNodeRef > MachineMetadataNodes
void setTarget(const TargetSubtargetInfo &NewSubtarget)
union llvm::VRegInfo::@202 D
TargetSubtargetInfo - Generic base class for all target subtargets.
Wrapper class representing virtual and physical registers.
bool parseNamedRegisterReference(PerFunctionMIParsingState &PFS, Register &Reg, StringRef Src, SMDiagnostic &Error)
DenseMap< unsigned, const Value * > Slots2Values
Maps from slot numbers to function's unnamed values.
Lightweight error class with error context and mandatory checking.
unsigned getSubRegIndex(StringRef Name)
Check if the given identifier is a name of a subregister index.
DenseMap< unsigned, unsigned > ConstantPoolSlots
bool parseVirtualRegisterReference(PerFunctionMIParsingState &PFS, VRegInfo *&Info, StringRef Src, SMDiagnostic &Error)
~PerTargetMIParsingState()=default
PerTargetMIParsingState(const TargetSubtargetInfo &STI)
const uint32_t * getRegMask(StringRef Identifier)
Check if the given identifier is a name of a register mask.
Represents a range in source code.
DenseMap< unsigned, MachineBasicBlock * > MBBSlots
bool parseRegisterReference(PerFunctionMIParsingState &PFS, Register &Reg, StringRef Src, SMDiagnostic &Error)
bool getBitmaskTargetFlag(StringRef Name, unsigned &Flag)
Try to convert a name of a bitmask target flag to the corresponding target flag.
bool getDirectTargetFlag(StringRef Name, unsigned &Flag)
Try to convert a name of a direct target flag to the corresponding target flag.
bool Explicit
VReg was explicitly specified in the .mir file.
bool parseMBBReference(PerFunctionMIParsingState &PFS, MachineBasicBlock *&MBB, StringRef Src, SMDiagnostic &Error)
LLVM Value Representation.
PerTargetMIParsingState & Target