58 std::unique_ptr<PerTargetMIParsingState>
Target;
62 bool NoLLVMIR =
false;
65 bool NoMIRDocuments =
false;
67 std::function<void(Function &)> ProcessIRFunction;
129 std::vector<CalleeSavedInfo> &CSIInfo,
131 bool IsRestored,
int FrameIdx);
133 template <
typename T>
175 In(SM.getMemoryBuffer(SM.AddNewSourceBuffer(
std::move(Contents),
SMLoc()))
178 Filename(Filename), Context(Context), ProcessIRFunction(Callback) {
220 if (!In.setCurrentDocument()) {
224 NoMIRDocuments =
true;
225 return std::make_unique<Module>(Filename, Context);
228 std::unique_ptr<Module> M;
231 if (
const auto *BSN =
232 dyn_cast_or_null<yaml::BlockScalarNode>(In.getCurrentNode())) {
235 Context, &IRSlots,
false);
241 if (!In.setCurrentDocument())
242 NoMIRDocuments =
true;
245 M = std::make_unique<Module>(Filename, Context);
260 }
while (In.setCurrentDocument());
273 if (ProcessIRFunction)
274 ProcessIRFunction(*F);
282 yaml::EmptyContext Ctx;
288 yaml::yamlize(In, YamlMF,
false, Ctx);
299 return error(
Twine(
"function '") + FunctionName +
300 "' isn't defined in the provided LLVM IR");
304 return error(
Twine(
"redefinition of machine function '") + FunctionName +
329 bool HasInlineAsm =
false;
334 if (
MI.isInlineAsm())
340 MF.setHasInlineAsm(HasInlineAsm);
361 Twine(
" call instruction block out of range.") +
364 if (MILoc.
Offset >= CallB->size())
366 Twine(
" call instruction offset out of range.") +
367 " Unable to reference instruction at bb: " +
369 auto CallI = std::next(CallB->instr_begin(), MILoc.
Offset);
372 Twine(
" call site info should reference call " 373 "instruction. Instruction at bb:") +
375 " is not a call instruction");
377 for (
auto ArgRegPair : YamlCSInfo.ArgForwardingRegs) {
380 return error(Error, ArgRegPair.Reg.SourceRange);
389 return error(
Twine(
"Call site info provided but not used"));
479 return error(Error, SrcRange);
491 computeFunctionProperties(MF);
515 return error(VReg.ID.SourceRange.Start,
516 Twine(
"redefinition of virtual register '%") +
517 Twine(VReg.ID.Value) +
"'");
524 const auto *RC =
Target->getRegClass(VReg.Class.Value);
532 VReg.Class.SourceRange.Start,
533 Twine(
"use of undefined register class or register bank '") +
534 VReg.Class.Value +
"'");
540 if (!VReg.PreferredRegister.Value.empty()) {
542 return error(VReg.Class.SourceRange.Start,
543 Twine(
"preferred register can only be set for normal vregs"));
546 VReg.PreferredRegister.Value, Error))
547 return error(Error, VReg.PreferredRegister.SourceRange);
552 for (
const auto &LiveIn : YamlMF.
LiveIns) {
555 return error(Error, LiveIn.Register.SourceRange);
557 if (!LiveIn.VirtualRegister.Value.empty()) {
561 return error(Error, LiveIn.VirtualRegister.SourceRange);
574 return error(Error, RegSource.SourceRange);
593 error(
Twine(
"Cannot determine class/bank of virtual register ") +
613 populateVRegInfo(Info,
Twine(
I->first()));
618 populateVRegInfo(Info,
Twine(
P.first));
661 if (parseMBBReference(PFS, MBB, YamlMFI.
SavePoint))
672 std::vector<CalleeSavedInfo> CSIInfo;
678 Object.IsImmutable, Object.IsAliased);
683 return error(Object.ID.SourceRange.Start,
684 Twine(
"StackID is not supported by target"));
690 return error(Object.ID.SourceRange.Start,
691 Twine(
"redefinition of fixed stack object '%fixed-stack.") +
692 Twine(Object.ID.Value) +
"'");
694 Object.CalleeSavedRestored, ObjectIdx))
705 if (!Name.
Value.empty()) {
706 Alloca = dyn_cast_or_null<AllocaInst>(
710 "alloca instruction named '" + Name.
Value +
711 "' isn't defined in the function '" + F.
getName() +
715 return error(Object.ID.SourceRange.Start,
716 Twine(
"StackID is not supported by target"));
721 Object.Size, Object.Alignment,
728 return error(Object.ID.SourceRange.Start,
729 Twine(
"redefinition of stack object '%stack.") +
730 Twine(Object.ID.Value) +
"'");
732 Object.CalleeSavedRestored, ObjectIdx))
734 if (Object.LocalOffset)
740 if (!CSIInfo.empty())
756 std::vector<CalleeSavedInfo> &CSIInfo,
758 if (RegisterSource.
Value.empty())
766 CSIInfo.push_back(CSI);
771 template <
typename T>
780 "expected a reference to a '" + TypeString +
785 template <
typename T>
787 const T &Object,
int FrameIdx) {
790 MDNode *Var =
nullptr, *Expr =
nullptr, *Loc =
nullptr;
791 if (parseMDNode(PFS, Var, Object.DebugVar) ||
792 parseMDNode(PFS, Expr, Object.DebugExpr) ||
793 parseMDNode(PFS, Loc, Object.DebugLoc))
795 if (!Var && !Expr && !Loc)
800 if (
typecheckMDNode(DIVar, Var, Object.DebugVar,
"DILocalVariable", *
this) ||
801 typecheckMDNode(DIExpr, Expr, Object.DebugExpr,
"DIExpression", *
this) ||
810 if (Source.
Value.empty())
824 for (
const auto &YamlConstant : YamlMF.
Constants) {
825 if (YamlConstant.IsTargetSpecific)
827 return error(YamlConstant.Value.SourceRange.Start,
828 "Can't parse target-specific constant pool entries yet");
832 return error(Error, YamlConstant.Value.SourceRange);
834 YamlConstant.Alignment
835 ? YamlConstant.Alignment
836 : M.getDataLayout().getPrefTypeAlignment(Value->
getType());
838 if (!ConstantPoolSlots.
insert(std::make_pair(YamlConstant.ID.Value, Index))
840 return error(YamlConstant.ID.SourceRange.Start,
841 Twine(
"redefinition of constant pool item '%const.") +
842 Twine(YamlConstant.ID.Value) +
"'");
851 std::vector<MachineBasicBlock *> Blocks;
852 for (
const auto &MBBSource :
Entry.Blocks) {
854 if (parseMBBReference(PFS, MBB, MBBSource.Value))
862 Twine(
"redefinition of jump table entry '%jump-table.") +
882 *Loc.getPointer() ==
'\'';
885 Loc = Loc.getFromPointer(Loc.getPointer() + Error.
getColumnNo() +
900 unsigned Line = LineAndColumn.first + Error.
getLineNo() - 1;
909 if (L.line_number() == Line) {
925 : Impl(
std::move(Impl)) {}
930 return Impl->parseIRModule();
934 return Impl->parseMachineFunctions(M, MMI);
941 if (std::error_code EC = FileOrErr.getError()) {
943 "Could not open input file: " + EC.message());
950 std::unique_ptr<MIRParser>
954 auto Filename = Contents->getBufferIdentifier();
960 "Can't read MIR with a Context that discards named Values")));
963 return std::make_unique<MIRParser>(std::make_unique<MIRParserImpl>(
964 std::move(Contents), Filename,
Context, ProcessIRFunction));
void setHasStackMap(bool s=true)
virtual bool parseMachineFunctionInfo(const yaml::MachineFunctionInfo &, PerFunctionMIParsingState &PFS, SMDiagnostic &Error, SMRange &SourceRange) const
Parse out the target's MachineFunctionInfo from the YAML reprsentation.
void setFrameAddressIsTaken(bool T)
Represents a range in source code.
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
reference emplace_back(ArgTypes &&... Args)
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
void setSavePoint(MachineBasicBlock *NewSave)
bool parseMachineBasicBlockDefinitions(PerFunctionMIParsingState &PFS, StringRef Src, SMDiagnostic &Error)
Parse the machine basic block definitions, and skip the machine instructions.
void setRestorePoint(MachineBasicBlock *NewRestore)
DenseMap< unsigned, unsigned > JumpTableSlots
void mapLocalFrameObject(int ObjectIndex, int64_t Offset)
Map a frame index into the local object block.
void setCalleeSavedInfoValid(bool v)
virtual bool isSupportedStackID(TargetStackID::Value ID) const
DenseMap< unsigned, unsigned > ConstantPoolSlots
This class represents lattice values for constants.
MachineFunctionProperties & reset(Property P)
void setHasWinCFI(bool v)
virtual yaml::MachineFunctionInfo * createDefaultFuncInfoYAML() const
Allocate and return a default initialized instance of the YAML representation for the MachineFunction...
Constant * parseConstantValue(StringRef Asm, SMDiagnostic &Err, const Module &M, const SlotMapping *Slots=nullptr)
Parse a type and a constant value in the given string.
unsigned EnableDebugEntryValues
Emit debug info about parameter's entry values.
A Module instance is used to store all the information related to an LLVM module. ...
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
void addLiveIn(unsigned Reg, unsigned vreg=0)
addLiveIn - Add the specified register as a live-in.
const MachineFunctionProperties & getProperties() const
Get the function properties.
void push_back(const T &Elt)
Optional< std::vector< FlowStringValue > > CalleeSavedRegisters
static std::unique_ptr< MemoryBuffer > getMemBuffer(StringRef InputData, StringRef BufferName="", bool RequiresNullTerminator=true)
Open the specified memory range as a MemoryBuffer.
Diagnostic information for machine IR parser.
bool parseMachineFunction(Module &M, MachineModuleInfo &MMI)
Parse the machine function in the current YAML document.
void ensureMaxAlignment(Align Alignment)
Make sure the function is at least Align bytes aligned.
DenseMap< unsigned, int > StackObjectSlots
Externally visible function.
A forward iterator which reads text lines from a buffer.
bool hasOneDef(unsigned RegNo) const
Return true if there is exactly one operand defining the specified register.
static unsigned index2VirtReg(unsigned Index)
Convert a 0-based index to a virtual register number.
ArrayRef< SMFixIt > getFixIts() const
void setRegBank(unsigned Reg, const RegisterBank &RegBank)
Set the register bank to RegBank for Reg.
bool parseMBBReference(PerFunctionMIParsingState &PFS, MachineBasicBlock *&MBB, StringRef Src, SMDiagnostic &Error)
const TargetRegisterClass * RC
std::unique_ptr< MachineFunctionInfo > MachineFuncInfo
Constant pool.
bool initializeCallSiteInfo(PerFunctionMIParsingState &PFS, const yaml::MachineFunction &YamlMF)
std::pair< unsigned, unsigned > getLineAndColumn(SMLoc Loc, unsigned BufferID=0) const
Find the line and column number for the specified location in the specified file. ...
MachineJumpTableInfo * getOrCreateJumpTableInfo(unsigned JTEntryKind)
getOrCreateJumpTableInfo - Get the JumpTableInfo for this function, if it does already exist...
std::unique_ptr< Module > parseIRModule()
Try to parse the optional LLVM module and the machine functions in the MIR file.
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
void setAlignment(Align A)
setAlignment - Set the alignment of the function.
const TimePointType Start
void setHasPatchPoint(bool s=true)
void setLocalFrameSize(int64_t sz)
Set the size of the local object blob.
DiagnosticSeverity
Defines the different supported severity of a diagnostic.
StringMap< VRegInfo * > VRegInfosNamed
This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
LLVMContext & getContext() const
Get the global data context.
void freezeReservedRegs(const MachineFunction &)
freezeReservedRegs - Called by the register allocator to freeze the set of reserved registers before ...
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
bool parseMachineFunctions(Module &M, MachineModuleInfo &MMI)
Parses MachineFunctions in the MIR file and add them to the given MachineModuleInfo MMI...
int CreateVariableSizedObject(Align Alignment, const AllocaInst *Alloca)
Notify the MachineFrameInfo object that a variable sized object has been created. ...
DenseMap< unsigned, int > FixedStackObjectSlots
const MemoryBuffer * getMemoryBuffer(unsigned i) const
Type * getType() const
All values are typed, get the type of this value.
std::vector< VirtualRegisterDefinition > VirtualRegisters
StringRef getLineContents() const
bool setupRegisterInfo(const PerFunctionMIParsingState &PFS, const yaml::MachineFunction &YamlMF)
void setHasMustTailInVarArgFunc(bool B)
bool HasMustTailInVarArgFunc
unsigned CVBytesOfCalleeSavedRegisters
unsigned AddNewSourceBuffer(std::unique_ptr< MemoryBuffer > F, SMLoc IncludeLoc)
Add a new source buffer to this source manager.
static void handleYAMLDiag(const SMDiagnostic &Diag, void *Context)
virtual void mirFileLoaded(MachineFunction &MF) const
This is called after a .mir file was loaded.
bool parseVirtualRegisterReference(PerFunctionMIParsingState &PFS, VRegInfo *&Info, StringRef Src, SMDiagnostic &Error)
void setStackProtectorIndex(int I)
void setHasOpaqueSPAdjustment(bool B)
union llvm::VRegInfo::@178 D
Analysis containing CSE Info
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
std::unique_ptr< Module > parseAssembly(MemoryBufferRef F, SMDiagnostic &Err, LLVMContext &Context, SlotMapping *Slots=nullptr, bool UpgradeDebugInfo=true, StringRef DataLayoutString="")
parseAssemblyFile and parseAssemblyString are wrappers around this function.
unsigned getMainFileID() const
Function * createDummyFunction(StringRef Name, Module &M)
Create an empty function with the given name.
const char * getPointer() const
std::unique_ptr< MIRParser > createMIRParserFromFile(StringRef Filename, SMDiagnostic &Error, LLVMContext &Context, std::function< void(Function &)> ProcessIRFunction=nullptr)
This function is the main interface to the MIR serialization format parser.
bool parseStackObjectReference(PerFunctionMIParsingState &PFS, int &FI, StringRef Src, SMDiagnostic &Error)
static Function * Create(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace, const Twine &N="", Module *M=nullptr)
bool parseMachineFunctions(Module &M, MachineModuleInfo &MMI)
unsigned const MachineRegisterInfo * MRI
bool parseRegisterInfo(PerFunctionMIParsingState &PFS, const yaml::MachineFunction &YamlMF)
bool parseStackObjectsDebugInfo(PerFunctionMIParsingState &PFS, const T &Object, int FrameIdx)
static bool isSSA(const MachineFunction &MF)
LLVM Basic Block Representation.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
This is an important class for using LLVM in a threaded context.
bool shouldDiscardValueNames() const
Return true if the Context runtime configuration is set to discard all value names.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
This function has undefined behavior.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This is an important base class in LLVM.
void setStackSize(uint64_t Size)
Set the size of the stack.
MachineJumpTable JumpTableInfo
Identifies call instruction location in machine function.
bool initializeJumpTableInfo(PerFunctionMIParsingState &PFS, const yaml::MachineJumpTable &YamlJTI)
LLVM_NODISCARD size_t find(char C, size_t From=0) const
Search for the first character C in the string.
bool parseNamedRegisterReference(PerFunctionMIParsingState &PFS, unsigned &Reg, StringRef Src, SMDiagnostic &Error)
static Type * getVoidTy(LLVMContext &C)
void setHasVAStart(bool B)
void addCallArgsForwardingRegs(const MachineInstr *CallI, CallSiteInfoImpl &&CallInfo)
static bool typecheckMDNode(T *&Result, MDNode *Node, const yaml::StringValue &Source, StringRef TypeString, MIRParserImpl &Parser)
Verify that given node is of a certain type. Return true on error.
This class describes a target machine that is implemented with the LLVM target-independent code gener...
unsigned MaxCallFrameSize
~0u means: not computed yet.
StringValue StackProtector
static FunctionType * get(Type *Result, ArrayRef< Type *> Params, bool isVarArg)
This static method is the primary way of constructing a FunctionType.
std::vector< MachineStackObject > StackObjects
bool def_empty(unsigned RegNo) const
def_empty - Return true if there are no instructions defining the specified register (it may be live-...
static BasicBlock * Create(LLVMContext &Context, const Twine &Name="", Function *Parent=nullptr, BasicBlock *InsertBefore=nullptr)
Creates a new BasicBlock.
void setCalleeSavedRegs(ArrayRef< MCPhysReg > CSRs)
Sets the updated Callee Saved Registers list.
void reportDiagnostic(const SMDiagnostic &Diag)
MachineConstantPool * getConstantPool()
getConstantPool - Return the constant pool object for the current function.
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling...
Serializable representation of MachineFrameInfo.
unsigned getNumVirtRegs() const
getNumVirtRegs - Return the number of virtual registers created.
void setStackID(int ObjectIdx, uint8_t ID)
MachineFunction & getOrCreateMachineFunction(const Function &F)
Returns the MachineFunction constructed for the IR function F.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
SMDiagnostic GetMessage(SMLoc Loc, DiagKind Kind, const Twine &Msg, ArrayRef< SMRange > Ranges=None, ArrayRef< SMFixIt > FixIts=None) const
Return an SMDiagnostic at the specified location with the specified string.
This class implements the parsing of LLVM IR that's embedded inside a MIR file.
bool parseMachineInstructions(PerFunctionMIParsingState &PFS, StringRef Src, SMDiagnostic &Error)
Parse the machine instructions.
MachineFunction * getMachineFunction(const Function &F) const
Returns the MachineFunction associated to IR function F if there is one, otherwise nullptr...
enum llvm::VRegInfo::uint8_t Kind
MachineOperand class - Representation of each machine instruction operand.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
StringRef getMessage() const
MachineFrameInfo FrameInfo
std::unique_ptr< MIRParser > createMIRParser(std::unique_ptr< MemoryBuffer > Contents, LLVMContext &Context, std::function< void(Function &)> ProcessIRFunction=nullptr)
This function is another interface to the MIR serialization format parser.
Information about stack frame layout on the target.
int CreateFixedSpillStackObject(uint64_t Size, int64_t SPOffset, bool IsImmutable=false)
Create a spill slot at a fixed location on the stack.
int CreateFixedObject(uint64_t Size, int64_t SPOffset, bool IsImmutable, bool isAliased=false)
Create a new object at a fixed location on the stack.
void setOffsetAdjustment(int Adj)
Set the correction for frame offsets.
ArrayRef< std::pair< unsigned, unsigned > > getRanges() const
void invalidateLiveness()
invalidateLiveness - Indicates that register liveness is no longer being tracked accurately.
void setAdjustsStack(bool V)
This class implements the register bank concept.
const Function & getFunction() const
Return the LLVM function that this machine code represents.
ValueSymbolTable * getValueSymbolTable()
getSymbolTable() - Return the symbol table if any, otherwise nullptr.
bool HasOpaqueSPAdjustment
The CalleeSavedInfo class tracks the information need to locate where a callee saved register is in t...
Function * getFunction(StringRef Name) const
Look up the specified function in the module symbol table.
Target - Wrapper for Target specific information.
A wrapper around std::string which contains a source range that's being set during parsing...
SourceMgr::DiagKind getKind() const
This struct contains the mappings from the slot numbers to unnamed metadata nodes, global values and types.
bool parseMDNode(PerFunctionMIParsingState &PFS, MDNode *&Node, StringRef Src, SMDiagnostic &Error)
bool error(const Twine &Message)
Report an error with the given message at unknown location.
static SMLoc getFromPointer(const char *Ptr)
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
MachineFunctionProperties & set(Property P)
LLVM_NODISCARD bool equals(StringRef RHS) const
equals - Check for string equality, this is more efficient than compare() when the relative ordering ...
static ErrorOr< std::unique_ptr< MemoryBuffer > > getFileOrSTDIN(const Twine &Filename, int64_t FileSize=-1, bool RequiresNullTerminator=true)
Open the specified file as a MemoryBuffer, or open stdin if the Filename is "-".
const LLVMTargetMachine & getTarget() const
bool Explicit
VReg was explicitly specified in the .mir file.
Representation of each machine instruction.
void setCalleeSavedInfo(const std::vector< CalleeSavedInfo > &CSI)
Used by prolog/epilog inserter to set the function's callee saved information.
std::vector< MachineFunctionLiveIn > LiveIns
MIRParserImpl(std::unique_ptr< MemoryBuffer > Contents, StringRef Filename, LLVMContext &Context, std::function< void(Function &)> ProcessIRFunction)
bool initializeFrameInfo(PerFunctionMIParsingState &PFS, const yaml::MachineFunction &YamlMF)
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
bool verify(Pass *p=nullptr, const char *Banner=nullptr, bool AbortOnError=true) const
Run the current MachineFunction through the machine code verifier, useful for debugger use...
std::vector< Entry > Entries
StringRef getName() const
Return a constant reference to the value's name.
VRegInfo & getVRegInfo(unsigned Num)
void push_back(MachineInstr *MI)
bool IsReturnAddressTaken
void setMaxCallFrameSize(unsigned S)
virtual const TargetFrameLowering * getFrameLowering() const
void addPhysRegsUsedFromRegMask(const uint32_t *RegMask)
addPhysRegsUsedFromRegMask - Mark any registers not in RegMask as used.
std::vector< MachineConstantPoolValue > Constants
bool tracksLiveness() const
tracksLiveness - Returns true when tracking register liveness accurately.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
void setCVBytesOfCalleeSavedRegisters(unsigned S)
MIRParser(std::unique_ptr< MIRParserImpl > Impl)
void setExposesReturnsTwice(bool B)
setCallsSetJmp - Set a flag that indicates if there's a call to a "returns twice" function...
std::vector< CallSiteInfo > CallSitesInfo
void diagnose(const DiagnosticInfo &DI)
Report a message to the currently installed diagnostic handler.
const LLVMTargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
void setSimpleHint(unsigned VReg, unsigned PrefReg)
Specify the preferred (target independent) register allocation hint for the specified virtual registe...
Value * lookup(StringRef Name) const
This method finds the value with the given Name in the the symbol table.
std::string str() const
Return the twine contents as a std::string.
LLVM_NODISCARD const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
bool initializeConstantPool(PerFunctionMIParsingState &PFS, MachineConstantPool &ConstantPool, const yaml::MachineFunction &YamlMF)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
std::vector< FixedMachineStackObject > FixedStackObjects
void setReturnAddressIsTaken(bool s)
int CreateStackObject(uint64_t Size, Align Alignment, bool isSpillSlot, const AllocaInst *Alloca=nullptr, uint8_t ID=0)
Create a new statically sized stack object, returning a nonnegative identifier to represent it...
Module * getParent()
Get the module that this global value is contained inside of...
LLVM Value Representation.
Lightweight error class with error context and mandatory checking.
std::unique_ptr< Module > parseIRModule()
Parses the optional LLVM IR module in the MIR file.
unsigned createJumpTableIndex(const std::vector< MachineBasicBlock *> &DestBBs)
createJumpTableIndex - Create a new jump table.
print Print MemDeps of function
void setObjectOffset(int ObjectIdx, int64_t SPOffset)
Set the stack frame offset of the specified object.
void setRegClass(unsigned Reg, const TargetRegisterClass *RC)
setRegClass - Set the register class of the specified virtual register.
StringRef - Represent a constant reference to a string, i.e.
const RegisterBank * RegBank
MachineJumpTableInfo::JTEntryKind Kind
Represents a location in source code.
DenseMap< unsigned, VRegInfo * > VRegInfos
bool parseRegisterReference(PerFunctionMIParsingState &PFS, unsigned &Reg, StringRef Src, SMDiagnostic &Error)
void setVariableDbgInfo(const DILocalVariable *Var, const DIExpression *Expr, int Slot, const DILocation *Loc)
Collect information used to emit debugging information of a variable.
void setObjectAlignment(int ObjectIdx, unsigned Align)
setObjectAlignment - Change the alignment of the specified stack object.
bool initializeMachineFunction(const yaml::MachineFunction &YamlMF, MachineFunction &MF)
Initialize the machine function to the state that's described in the MIR file.
unsigned getConstantPoolIndex(const Constant *C, unsigned Alignment)
getConstantPoolIndex - Create a new entry in the constant pool or return an existing one...
bool parseCalleeSavedRegister(PerFunctionMIParsingState &PFS, std::vector< CalleeSavedInfo > &CSIInfo, const yaml::StringValue &RegisterSource, bool IsRestored, int FrameIdx)
Properties which a MachineFunction may have at a given point in time.
This class contains meta information specific to a module.
an instruction to allocate memory on the stack
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...