48 struct FrameIndexOperand {
54 : Name(Name.str()), ID(ID), IsFixed(IsFixed) {}
58 return FrameIndexOperand(Name, ID,
false);
62 static FrameIndexOperand createFixed(
unsigned ID) {
63 return FrameIndexOperand(
"", ID,
true);
112 : OS(OS), MST(MST), RegisterMaskIds(RegisterMaskIds),
113 StackObjectOperandMapping(StackObjectOperandMapping) {}
125 unsigned I,
bool ShouldPrintRegisterTies,
126 LLT TypeToPrint,
bool IsDef =
false);
140 Mod.
print(OS,
nullptr);
158 else if (Reg < TRI->getNumRegs())
171 initRegisterMaskIds(MF);
195 bool IsNewlineNeeded =
false;
196 for (
const auto &
MBB : MF) {
199 MIPrinter(StrOS, MST, RegisterMaskIds, StackObjectOperandMapping)
201 IsNewlineNeeded =
true;
224 VReg.
Class = std::string(
"_");
226 "Generic registers must have a valid type");
245 if (UsedPhysRegMask.
none())
247 std::vector<yaml::FlowStringValue> CalleeSavedRegisters;
248 for (
unsigned I = 0, E = UsedPhysRegMask.
size();
I !=
E; ++
I) {
249 if (!UsedPhysRegMask[
I]) {
252 CalleeSavedRegisters.push_back(Reg);
276 MIPrinter(StrOS, MST, RegisterMaskIds, StackObjectOperandMapping)
281 MIPrinter(StrOS, MST, RegisterMaskIds, StackObjectOperandMapping)
308 StackObjectOperandMapping.
insert(
309 std::make_pair(
I, FrameIndexOperand::createFixed(ID++)));
322 Alloca->hasName() ? Alloca->getName() :
"<unnamed alloca>";
333 StackObjectOperandMapping.
insert(std::make_pair(
334 I, FrameIndexOperand::create(YamlObject.
Name.
Value, ID++)));
340 auto StackObjectInfo = StackObjectOperandMapping.
find(CSInfo.getFrameIdx());
341 assert(StackObjectInfo != StackObjectOperandMapping.
end() &&
342 "Invalid stack object index");
343 const FrameIndexOperand &StackObject = StackObjectInfo->second;
344 if (StackObject.IsFixed)
351 auto StackObjectInfo = StackObjectOperandMapping.
find(LocalObject.first);
352 assert(StackObjectInfo != StackObjectOperandMapping.
end() &&
353 "Invalid stack object index");
354 const FrameIndexOperand &StackObject = StackObjectInfo->second;
355 assert(!StackObject.IsFixed &&
"Expected a locally mapped stack object");
356 YMF.
StackObjects[StackObject.ID].LocalOffset = LocalObject.second;
363 MIPrinter(StrOS, MST, RegisterMaskIds, StackObjectOperandMapping)
370 auto StackObjectInfo = StackObjectOperandMapping.
find(DebugVar.Slot);
371 assert(StackObjectInfo != StackObjectOperandMapping.
end() &&
372 "Invalid stack object index");
373 const FrameIndexOperand &StackObject = StackObjectInfo->second;
374 assert(!StackObject.IsFixed &&
"Expected a non-fixed stack object");
378 DebugVar.Var->printAsOperand(StrOS, MST);
382 DebugVar.Expr->printAsOperand(StrOS, MST);
386 DebugVar.Loc->printAsOperand(StrOS, MST);
396 if (
Constant.isMachineConstantPoolEntry())
403 YamlConstant.
ID = ID++;
419 for (
const auto *
MBB : Table.MBBs) {
421 MIPrinter(StrOS, MST, RegisterMaskIds, StackObjectOperandMapping)
426 YamlJTI.
Entries.push_back(Entry);
434 RegisterMaskIds.
insert(std::make_pair(
Mask, I++));
440 bool HasAttributes =
false;
443 OS <<
"." << BB->getName();
445 HasAttributes =
true;
449 OS <<
"<ir-block badref>";
451 OS << (
Twine(
"%ir-block.") +
Twine(Slot)).str();
455 OS << (HasAttributes ?
", " :
" (");
456 OS <<
"address-taken";
457 HasAttributes =
true;
460 OS << (HasAttributes ?
", " :
" (");
462 HasAttributes =
true;
465 OS << (HasAttributes ?
", " :
" (");
467 HasAttributes =
true;
473 bool HasLineAttributes =
false;
476 OS.
indent(2) <<
"successors: ";
487 HasLineAttributes =
true;
494 OS.
indent(2) <<
"liveins: ";
496 for (
const auto &LI : MBB.
liveins()) {
501 if (!LI.LaneMask.all())
505 HasLineAttributes =
true;
508 if (HasLineAttributes)
510 bool IsInBundle =
false;
517 OS.
indent(IsInBundle ? 4 : 2);
535 if (!Operand.isReg() || Operand.isDef())
540 if (ExpectedTiedIdx != TiedIdx)
557 if (!OpInfo.isGenericType())
560 if (PrintedTypes[OpInfo.getGenericTypeIndex()])
563 PrintedTypes.
set(OpInfo.getGenericTypeIndex());
571 const auto *TRI =
SubTarget.getRegisterInfo();
572 assert(TRI &&
"Expected target register info");
574 assert(
TII &&
"Expected target instruction info");
594 OS <<
"frame-setup ";
599 bool NeedComma =
false;
611 OS <<
" debug-location ";
617 bool NeedComma =
false;
631 OS <<
'.' << BB->getName();
656 Slot = CustomMST.getLocalSlot(&BB);
662 if (isa<GlobalValue>(V)) {
666 if (isa<Constant>(V)) {
682 auto ObjectInfo = StackObjectOperandMapping.
find(FrameIndex);
683 assert(ObjectInfo != StackObjectOperandMapping.
end() &&
684 "Invalid frame index");
685 const FrameIndexOperand &Operand = ObjectInfo->second;
686 if (Operand.IsFixed) {
687 OS <<
"%fixed-stack." << Operand.ID;
690 OS <<
"%stack." << Operand.ID;
691 if (!Operand.Name.empty())
692 OS <<
'.' << Operand.Name;
707 for (
const auto &I :
Flags) {
720 assert(
TII &&
"expected instruction info");
722 OS <<
"target-flags(";
723 const bool HasDirectFlags =
Flags.first;
724 const bool HasBitmaskFlags =
Flags.second;
725 if (!HasDirectFlags && !HasBitmaskFlags) {
729 if (HasDirectFlags) {
733 OS <<
"<unknown target flag>";
735 if (!HasBitmaskFlags) {
739 bool IsCommaNeeded = HasDirectFlags;
740 unsigned BitMask =
Flags.second;
741 auto BitMasks =
TII->getSerializableBitmaskMachineOperandTargetFlags();
742 for (
const auto &
Mask : BitMasks) {
744 if ((BitMask &
Mask.first) ==
Mask.first) {
747 IsCommaNeeded =
true;
750 BitMask &= ~(
Mask.first);
758 OS <<
"<unknown bitmask target flag>";
765 assert(
TII &&
"expected instruction info");
766 auto Indices =
TII->getSerializableTargetIndices();
767 for (
const auto &I : Indices) {
768 if (I.first == Index) {
776 unsigned I,
bool ShouldPrintRegisterTies,
LLT TypeToPrint,
782 OS << (Op.
isDef() ?
"implicit-def " :
"implicit ");
783 else if (!IsDef && Op.
isDef())
795 OS <<
"early-clobber ";
802 if (ShouldPrintRegisterTies && Op.
isTied() && !Op.
isDef())
805 OS <<
'(' << TypeToPrint <<
')';
827 OS <<
"target-index(";
838 OS <<
"%jump-table." << Op.
getIndex();
850 OS <<
"blockaddress(";
860 if (RegMaskInfo != RegisterMaskIds.
end())
869 bool IsCommaNeeded =
false;
871 if (RegMask[
Reg / 32] & (1U << (
Reg % 32))) {
875 IsCommaNeeded =
true;
899 OS <<
"intrinsic(@" << TII->
getName(ID) <<
')';
918 OS <<
"non-temporal ";
920 OS <<
"dereferenceable ";
926 assert(Op.
isStore() &&
"Non load machine operand must be a store");
931 OS << (Op.
isLoad() ?
" from " :
" into ");
934 OS << (Op.
isLoad() ?
" from " :
" into ");
935 assert(PVal &&
"Expected a pseudo source value");
936 switch (PVal->kind()) {
947 OS <<
"constant-pool";
951 cast<FixedStackPseudoSourceValue>(PVal)->getFrameIndex());
955 cast<GlobalValuePseudoSourceValue>(PVal)->getValue()->printAsOperand(
959 OS <<
"call-entry $";
961 OS, cast<ExternalSymbolPseudoSourceValue>(PVal)->
getSymbol());
974 AAInfo.TBAA->printAsOperand(OS, MST);
977 OS <<
", !alias.scope ";
978 AAInfo.Scope->printAsOperand(OS, MST);
980 if (AAInfo.NoAlias) {
982 AAInfo.NoAlias->printAsOperand(OS, MST);
1005 OS <<
"same_value ";
1007 OS <<
"<mcsymbol> ";
1013 OS <<
"<mcsymbol> ";
1018 OS <<
"def_cfa_register ";
1020 OS <<
"<mcsymbol> ";
1024 OS <<
"def_cfa_offset ";
1026 OS <<
"<mcsymbol> ";
1032 OS <<
"<mcsymbol> ";
1038 OS <<
"<unserializable cfi operation>";
1045 Out << const_cast<Module &>(M);
bool isInsideBundle() const
Return true if MI is in a bundle (but not the first MI in a bundle).
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
bool isEHPad() const
Returns true if the block is a landing pad.
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
unsigned getAlignment() const
getAlignment - Return the alignment (log2, not bytes) of the function.
StringValue VirtualRegister
size_type size() const
size - Returns the number of bits in this bitvector.
MachineInstr * getParent()
getParent - Return the instruction that this operand belongs to.
const GlobalValue * getGlobal() const
instr_iterator instr_begin()
iterator_range< livein_iterator > liveins() const
LLT getType(unsigned VReg) const
Get the low-level type of VReg or LLT{} if VReg is not a generic (target independent) virtual registe...
static StringRef input(StringRef Str, void *Ctxt, Module &Mod)
instr_iterator instr_end()
This is a 'bitvector' (really, a variable-sized bit array), optimized for the case when the array is ...
static unsigned virtReg2Index(unsigned Reg)
Convert a virtual register number to a 0-based index.
bool none() const
none - Returns true if none of the bits are set.
livein_iterator livein_end() const
bool hasProperty(Property P) const
const ConstantFP * getFPImm() const
MachineBasicBlock * getMBB() const
static unsigned index2VirtReg(unsigned Index)
Convert a 0-based index to a virtual register number.
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
A Module instance is used to store all the information related to an LLVM module. ...
unsigned getSimpleHint(unsigned VReg) const
getSimpleHint - Return the preferred register allocation hint, or 0 if a standard simple hint (Type =...
static void printIRSlotNumber(raw_ostream &OS, int Slot)
static const char * getTargetFlagName(const TargetInstrInfo *TII, unsigned TF)
This class prints out the machine functions using the MIR serialization format.
MachineBasicBlock * getRestorePoint() const
Optional< std::vector< FlowStringValue > > CalleeSavedRegisters
Describe properties that are true of each instruction in the target description file.
static bool isVirtualRegister(unsigned Reg)
Return true if the specified register number is in the virtual register namespace.
Address of indexed Jump Table for switch.
const BitVector & getUsedPhysRegsMask() const
raw_ostream & indent(unsigned NumSpaces)
indent - Insert 'NumSpaces' spaces.
int getLocalSlot(const Value *V)
Return the slot number of the specified local value.
bool adjustsStack() const
Return true if this function adjusts the stack – e.g., when calling another function.
uint32_t getNumerator() const
static LLT getTypeToPrint(const MachineInstr &MI, unsigned OpIdx, SmallBitVector &PrintedTypes, const MachineRegisterInfo &MRI)
bool isReturnAddressTaken() const
This method may be called any time after instruction selection is complete to determine if there is a...
const MCInstrDesc & getDesc() const
Returns the target instruction descriptor of this MachineInstr.
MachineBasicBlock reference.
const Function * getParent() const
Return the enclosing method, or null if none.
const char * getSymbolName() const
bool isCFIInstruction() const
const Function * getFunction() const
getFunction - Return the LLVM function that this machine code represents
Manage lifetime of a slot tracker for printing IR.
iterator_range< mmo_iterator > memoperands()
const MDNode * getMetadata() const
Mask of live-out registers.
print alias Alias Set Printer
bool hasStackProtectorIndex() const
VariableDbgInfoMapTy & getVariableDbgInfo()
unsigned getRegister() const
void printTargetFlags(const MachineOperand &Op)
StringRef getName() const
Return a constant reference to the value's name.
unsigned getMaxAlignment() const
Return the alignment in bytes that this function must be aligned to, which is greater than the defaul...
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
Mask of preserved registers.
uint64_t getStackSize() const
Return the number of bytes that must be allocated to hold all of the fixed size frame objects...
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
const std::vector< MachineJumpTableEntry > & getJumpTables() const
unsigned getNumVirtRegs() const
getNumVirtRegs - Return the number of virtual registers created.
A description of a memory reference used in the backend.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
StringRef getName(ID id)
Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx".
This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...
struct fuzzer::@269 Flags
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
const HexagonInstrInfo * TII
unsigned getCFIIndex() const
const TargetRegisterInfo * getTargetRegisterInfo() const
Serializable representation of the fixed stack object from the MachineFrameInfo class.
void print(const MachineBasicBlock &MBB)
static const char * getTargetIndexName(const MachineFunction &MF, int Index)
Target-dependent index+offset operand.
bool isReg() const
isReg - Tests if this is a MO_Register operand.
const TargetRegisterClass * getRegClass(unsigned Reg) const
Return the register class of the specified virtual register.
Name of external global symbol.
const MachineFunctionProperties & getProperties() const
Get the function properties.
static void printCFIRegister(unsigned DwarfReg, raw_ostream &OS, const TargetRegisterInfo *TRI)
Reg
All possible values of the reg field in the ModR/M byte.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
bool isFrameAddressTaken() const
This method may be called any time after instruction selection is complete to determine if there is a...
unsigned getNumOperands() const
Access to explicit operands of the instruction.
bool isVariableSizedObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a variable sized object.
unsigned getNumRegs() const
Return the number of registers this target has (useful for sizing arrays holding per register informa...
int getObjectIndexBegin() const
Return the minimum frame object index.
std::vector< VirtualRegisterDefinition > VirtualRegisters
Immediate >64bit operand.
int getOffsetAdjustment() const
Return the correction for frame offsets.
void printAsOperand(raw_ostream &O, bool PrintType=true, const Module *M=nullptr) const
Print the name of this Value out to the specified raw_ostream.
bool HasMustTailInVarArgFunc
bool livein_empty() const
const MachineJumpTableInfo * getJumpTableInfo() const
getJumpTableInfo - Return the jump table info object for the current function.
const char * getRegClassName(const TargetRegisterClass *Class) const
Returns the name of the register class.
This class is a data container for one entry in a MachineConstantPool.
bool isImmutableObjectIndex(int ObjectIdx) const
isImmutableObjectIndex - Returns true if the specified index corresponds to an immutable object...
Expected< const typename ELFT::Sym * > getSymbol(typename ELFT::SymRange Symbols, uint32_t Index)
const BasicBlock * getBasicBlock() const
Return the LLVM basic block that this instance corresponded to originally.
int64_t getLocalFrameObjectCount() const
Return the number of objects allocated into the local object block.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-compatible GC")
bool isSpillSlotObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a spill slot.
const MachineBasicBlock * getParent() const
format_object< Ts...> format(const char *Fmt, const Ts &...Vals)
These are helper functions used to produce formatted output.
TargetInstrInfo - Interface to description of machine instruction set.
std::pair< int, int64_t > getLocalFrameObjectMap(int i) const
Get the local offset mapping for a for an object.
bool isEarlyClobber() const
const RegisterBank * getRegBankOrNull(unsigned Reg) const
Return the register bank of Reg, or null if Reg has not been assigned a register bank or has been ass...
unsigned findTiedOperandIdx(unsigned OpIdx) const
Given the index of a tied register operand, find the operand it is tied to.
bool hasStackMap() const
This method may be called any time after instruction selection is complete to determine if there is a...
Address of a global value.
Intrinsic::ID getIntrinsicID() const
unsigned getTargetFlags() const
MIRPrinter(raw_ostream &OS)
std::vector< FlowStringValue > Blocks
unsigned const MachineRegisterInfo * MRI
Serializable representation of stack object from the MachineFrameInfo class.
LLVM Basic Block Representation.
bool isAliasedObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to an object that might be pointed to by an LLVM IR v...
AAMDNodes getAAInfo() const
Return the AA tags for the memory reference.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
This is an important base class in LLVM.
static StringRef getPredicateName(Predicate P)
This file contains the declarations for the subclasses of Constant, which represent the different fla...
const MachineOperand & getOperand(unsigned i) const
MachineJumpTable JumpTableInfo
Constant pool.
bool hasVAStart() const
Returns true if the function calls the llvm.va_start intrinsic.
bool isIntPredicate() const
bool tracksLiveness() const
tracksLiveness - Returns true when tracking register liveness accurately.
unsigned getNumExplicitOperands() const
Returns the number of non-implicit operands.
Address of a basic block.
virtual ArrayRef< const char * > getRegMaskNames() const =0
bool isVariadic(QueryType Type=IgnoreBundle) const
Return true if this instruction can have a variable number of operands.
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
bool getFlag(MIFlag Flag) const
Return whether an MI flag is set.
void convertStackObjects(yaml::MachineFunction &YMF, const MachineFunction &MF, ModuleSlotTracker &MST)
virtual ArrayRef< std::pair< unsigned, const char * > > getSerializableDirectMachineOperandTargetFlags() const
Return an array that contains the direct target flag values and their names.
const std::vector< MCCFIInstruction > & getFrameInstructions() const
Returns a reference to a list of cfi instructions in the function's prologue.
unsigned MaxCallFrameSize
This class prints out the machine instructions using the MIR serialization format.
StringValue StackProtector
std::vector< MachineStackObject > StackObjects
int64_t getOffset() const
Return the offset from the symbol in this operand.
const PseudoSourceValue * getPseudoValue() const
MachineConstantPool * getConstantPool()
getConstantPool - Return the constant pool object for the current function.
Serializable representation of MachineFrameInfo.
static void printReg(unsigned Reg, raw_ostream &OS, const TargetRegisterInfo *TRI)
void printMIR(raw_ostream &OS, const Module &M)
Print LLVM IR using the MIR serialization format to the given output stream.
succ_iterator succ_begin()
void incorporateFunction(const Function &F)
Incorporate the given function.
unsigned getSubReg() const
The Output class is used to generate a yaml document from in-memory structs and vectors.
int getLLVMRegNum(unsigned RegNum, bool isEH) const
Map a dwarf register back to a target register.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
std::string & str()
Flushes the stream contents to the target string and returns the string's reference.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
int getOperandConstraint(unsigned OpNum, MCOI::OperandConstraint Constraint) const
Returns the value of the specific constraint if it is set.
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
bool isDeadObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a dead object.
TargetIntrinsicInfo - Interface to description of machine instruction set.
const char * getName() const
Get a user friendly name of this register bank.
bool hasCalls() const
Return true if the current function has any function calls.
OpType getOperation() const
bool memoperands_empty() const
Return true if we don't have any memory operands which described the the memory access done by this i...
bool isDereferenceable() const
const uint32_t * getRegMask() const
getRegMask - Returns a bit mask of registers preserved by this RegMask operand.
StringValue PreferredRegister
Generic predicate for ISel.
MachineOperand class - Representation of each machine instruction operand.
unsigned getObjectAlignment(int ObjectIdx) const
Return the alignment of the specified stack object.
Module.h This file contains the declarations for the Module class.
MachineFrameInfo FrameInfo
void printIRBlockReference(const BasicBlock &BB)
unsigned getMaxCallFrameSize() const
Return the maximum size of a call frame that must be allocated for an outgoing function call...
void printLLVMNameWithoutPrefix(raw_ostream &OS, StringRef Name)
Print out a name of an LLVM value without any prefixes.
BasicBlock * getBasicBlock() const
livein_iterator livein_begin() const
unsigned getPredicate() const
virtual std::string getName(unsigned IID, Type **Tys=nullptr, unsigned numTys=0) const =0
Return the name of a target intrinsic, e.g.
MCSymbol reference (for debug/eh info)
bool HasOpaqueSPAdjustment
const ConstantInt * getCImm() const
const Value * getValue() const
Return the base address of the memory access.
Special value supplied for machine level alias analysis.
const char * getSubRegIndexName(unsigned SubIdx) const
Return the human-readable symbolic target-specific name for the specified SubRegIndex.
A wrapper around std::string which contains a source range that's being set during parsing...
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
int getStackProtectorIndex() const
Return the index for the stack protector object.
bool isNonTemporal() const
void print(raw_ostream &OS, AssemblyAnnotationWriter *AAW, bool ShouldPreserveUseListOrder=false, bool IsForDebug=false) const
Print the module to an output stream with an optional AssemblyAnnotationWriter.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
MachineBasicBlock * getSavePoint() const
bool hasSuccessorProbabilities() const
Return true if any of the successors have probabilities attached to them.
Representation of each machine instruction.
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
std::vector< MachineFunctionLiveIn > LiveIns
bool hasAddressTaken() const
Test whether this block is potentially the target of an indirect branch.
bool hasPatchPoint() const
This method may be called any time after instruction selection is complete to determine if there is a...
static void output(const Module &Mod, void *Ctxt, raw_ostream &OS)
const uint32_t * getRegLiveOut() const
getRegLiveOut - Returns a bit mask of live-out registers.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
This class should be specialized by type that requires custom conversion to/from a YAML literal block...
bool exposesReturnsTwice() const
exposesReturnsTwice - Returns true if the function calls setjmp or any other similar functions with a...
virtual const TargetIntrinsicInfo * getIntrinsicInfo() const
If intrinsic information is available, return it. If not, return null.
static bool hasComplexRegisterTies(const MachineInstr &MI)
Return true when an instruction has tied register that can't be determined by the instruction's descr...
std::vector< Entry > Entries
bool IsReturnAddressTaken
MCSymbol * getMCSymbol() const
iterator find(const KeyT &Val)
std::vector< MachineConstantPoolValue > Constants
const TargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
Abstract Stack Frame Index.
void printMBBReference(const MachineBasicBlock &MBB)
JTEntryKind getEntryKind() const
void convert(yaml::MachineFunction &MF, const MachineRegisterInfo &RegInfo, const TargetRegisterInfo *TRI)
This file defines passes to print out IR in various granularities.
unsigned getReg() const
getReg - Returns the register number.
void printOffset(int64_t Offset)
const TargetRegisterClass * getRegClassOrNull(unsigned Reg) const
Return the register class of Reg, or null if Reg has not been assigned a register class yet...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Function * getFunction() const
std::vector< FixedMachineStackObject > FixedStackObjects
A raw_ostream that writes to an std::string.
const MDNode * getRanges() const
Return the range tag for the memory reference.
virtual const TargetInstrInfo * getInstrInfo() const
Module * getParent()
Get the module that this global value is contained inside of...
LLVM Value Representation.
int64_t getOffset() const
For normal values, this is a byte offset added to the base address.
Floating-point immediate operand.
static LLVM_ATTRIBUTE_UNUSED Printable PrintLaneMask(LaneBitmask LaneMask)
Create Printable object to print LaneBitmasks on a raw_ostream.
void printIRValueReference(const Value &V)
const MCOperandInfo * OpInfo
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
void printStackObjectReference(int FrameIndex)
bool def_empty(unsigned RegNo) const
def_empty - Return true if there are no instructions defining the specified register (it may be live-...
uint64_t getSize() const
Return the size in bytes of the memory reference.
This class implements an extremely fast bulk output stream that can only output to a stream...
bool hasOpaqueSPAdjustment() const
Returns true if the function contains opaque dynamic stack adjustments.
const char * getName(unsigned RegNo) const
Return the human-readable symbolic target-specific name for the specified physical register...
const std::vector< MachineConstantPoolEntry > & getConstants() const
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
StringRef - Represent a constant reference to a string, i.e.
const BlockAddress * getBlockAddress() const
Address of indexed Constant in Constant Pool.
int getObjectIndexEnd() const
Return one past the maximum frame object index.
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
MachineJumpTableInfo::JTEntryKind Kind
MIPrinter(raw_ostream &OS, ModuleSlotTracker &MST, const DenseMap< const uint32_t *, unsigned > &RegisterMaskIds, const DenseMap< int, FrameIndexOperand > &StackObjectOperandMapping)
MCSymbol * getLabel() const
const AllocaInst * getObjectAllocation(int ObjectIdx) const
Return the underlying Alloca of the specified stack object if it exists.
const Function * getCurrentFunction() const
void print(const MachineFunction &MF)
LLVM_NODISCARD std::string lower() const
int64_t getObjectSize(int ObjectIdx) const
Return the size of the specified object.
bool hasMustTailInVarArgFunc() const
Returns true if the function is variadic and contains a musttail call.
bool isInternalRead() const
Metadata reference (for debug info)
uint64_t getBaseAlignment() const
Return the minimum known alignment in bytes of the base address, without the offset.
unsigned getAlignment() const
Return alignment of the basic block.