24 #include "llvm/Config/llvm-config.h" 36 cl::desc(
"Number of registers to limit to when " 37 "printing regmask operands in IR dumps. " 66 SmallContents.RegNo =
Reg;
72 SmallContents.RegNo =
Reg;
100 assert(
isReg() &&
"Wrong MachineOperand accessor");
101 assert((!Val || !
isDebug()) &&
"Marking a debug operation as def");
104 assert(!IsDeadOrKill &&
"Changing def/use with dead/kill set not supported");
117 assert(
isReg() &&
"Wrong MachineOperand accessor");
119 "isRenamable should only be checked on physical registers");
135 assert(
isReg() &&
"Wrong MachineOperand accessor");
137 "setIsRenamable should only be called on physical registers");
143 void MachineOperand::removeRegFromUses() {
144 if (!
isReg() || !isOnRegUseList())
148 MF->getRegInfo().removeRegOperandFromUseList(
this);
160 Contents.ImmVal = ImmVal;
169 Contents.CFP = FPImm;
173 unsigned TargetFlags) {
175 "Cannot change a tied operand into an external symbol");
180 Contents.OffsetedInfo.Val.SymbolName = SymName;
186 unsigned TargetFlags) {
188 "Cannot change a tied operand into a global address");
193 Contents.OffsetedInfo.Val.GV = GV;
200 "Cannot change a tied operand into an MCSymbol");
210 "Cannot change a tied operand into a FrameIndex");
219 unsigned TargetFlags) {
221 "Cannot change a tied operand into a FrameIndex");
239 RegInfo = &MF->getRegInfo();
242 bool WasReg =
isReg();
243 if (RegInfo && WasReg)
247 assert(!(isDead && !isDef) &&
"Dead flag on non-def");
248 assert(!(isKill && isDef) &&
"Kill flag on def");
250 SmallContents.RegNo =
Reg;
251 SubReg_TargetFlags = 0;
254 IsDeadOrKill = isKill |
isDead;
257 IsInternalRead =
false;
258 IsEarlyClobber =
false;
261 Contents.Reg.Prev =
nullptr;
312 if (RegMask == OtherRegMask)
318 unsigned RegMaskSize = (TRI->
getNumRegs() + 31) / 32;
321 return std::equal(RegMask, RegMask + RegMaskSize, OtherRegMask);
399 TRI = MF->getSubtarget().getRegisterInfo();
400 IntrinsicInfo = MF->getTarget().getIntrinsicInfo();
406 assert(
TII &&
"expected instruction info");
407 auto Indices =
TII->getSerializableTargetIndices();
408 auto Found =
find_if(Indices, [&](
const std::pair<int, const char *> &
I) {
409 return I.first ==
Index;
411 if (Found != Indices.end())
412 return Found->second;
418 for (
const auto &
I : Flags) {
429 OS <<
"%dwarfreg." << DwarfReg;
450 }
else if (
const Module *M =
F->getParent()) {
472 OS <<
"syncscope(\"";
482 for (
const auto &
I : Flags) {
483 if (
I.first == TMMOFlag) {
496 if (Alloca->hasName())
497 Name = Alloca->getName();
522 assert(
TII &&
"expected instruction info");
524 OS <<
"target-flags(";
525 const bool HasDirectFlags = Flags.first;
526 const bool HasBitmaskFlags = Flags.second;
527 if (!HasDirectFlags && !HasBitmaskFlags) {
531 if (HasDirectFlags) {
535 OS <<
"<unknown target flag>";
537 if (!HasBitmaskFlags) {
541 bool IsCommaNeeded = HasDirectFlags;
542 unsigned BitMask = Flags.second;
544 for (
const auto &
Mask : BitMasks) {
546 if ((BitMask &
Mask.first) ==
Mask.first) {
549 IsCommaNeeded =
true;
552 BitMask &= ~(
Mask.first);
560 OS <<
"<unknown bitmask target flag>";
566 OS <<
"<mcsymbol " << Sym <<
">";
609 OS <<
"remember_state ";
614 OS <<
"restore_state ";
626 OS <<
"def_cfa_register ";
632 OS <<
"def_cfa_offset ";
652 OS <<
"adjust_cfa_offset ";
669 for (
size_t i = 0; i <
e; ++i)
690 OS <<
"window_save ";
695 OS <<
"negate_ra_sign_state ";
701 OS <<
"<unserializable cfi directive>";
716 print(OS, DummyMST, TypeToPrint,
None,
false,
719 0, TRI, IntrinsicInfo);
724 bool IsStandalone,
bool ShouldPrintRegisterTies,
725 unsigned TiedOperandIdx,
733 OS << (
isDef() ?
"implicit-def " :
"implicit ");
734 else if (PrintDef &&
isDef())
746 OS <<
"early-clobber ";
755 MRI = &MF->getRegInfo();
765 OS <<
".subreg" <<
SubReg;
771 if (IsStandalone || !PrintDef || MRI.
def_empty(Reg)) {
778 if (ShouldPrintRegisterTies &&
isTied() && !
isDef())
779 OS <<
"(tied-def " << TiedOperandIdx <<
")";
782 OS <<
'(' << TypeToPrint <<
')';
788 const auto *
TII = MF->getSubtarget().getInstrInfo();
789 assert(
TII &&
"expected instruction info");
790 Formatter =
TII->getMIRFormatter();
809 bool IsFixed =
false;
812 MFI = &MF->getFrameInfo();
821 OS <<
"target-index(";
822 const char *
Name =
"<unknown>";
825 Name = TargetIndexName;
849 OS <<
"blockaddress(";
861 unsigned NumRegsInMask = 0;
862 unsigned NumRegsEmitted = 0;
863 for (
unsigned i = 0; i < TRI->
getNumRegs(); ++i) {
864 unsigned MaskWord = i / 32;
865 unsigned MaskBit = i % 32;
866 if (
getRegMask()[MaskWord] & (1 << MaskBit)) {
875 if (NumRegsEmitted != NumRegsInMask)
876 OS <<
" and " << (NumRegsInMask - NumRegsEmitted) <<
" more...";
889 bool IsCommaNeeded =
false;
891 if (RegMask[
Reg / 32] & (1U << (
Reg % 32))) {
895 IsCommaNeeded =
true;
912 OS <<
"<cfi directive>";
917 if (ID < Intrinsic::num_intrinsics)
919 else if (IntrinsicInfo)
920 OS <<
"intrinsic(@" << IntrinsicInfo->
getName(ID) <<
')';
922 OS <<
"intrinsic(" << ID <<
')';
932 OS <<
"shufflemask(";
935 for (
int Elt : Mask) {
937 OS << Separator <<
"undef";
939 OS << Separator << Elt;
948 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 964 if (!V.is<
const Value *>())
967 const Value *BasePtr = V.get<
const Value *>();
968 if (BasePtr ==
nullptr)
1007 uint64_t s, uint64_t a,
1012 : PtrInfo(ptrinfo),
Size(s), FlagVals(f), BaseAlignLog2(
Log2_32(a) + 1),
1013 AAInfo(AAInfo), Ranges(Ranges) {
1016 "invalid pointer value");
1020 AtomicInfo.SSID =
static_cast<unsigned>(SSID);
1022 AtomicInfo.Ordering =
static_cast<unsigned>(Ordering);
1024 AtomicInfo.FailureOrdering =
static_cast<unsigned>(FailureOrdering);
1049 PtrInfo = MMO->PtrInfo;
1068 OS <<
"non-temporal ";
1070 OS <<
"dereferenceable ";
1084 "machine memory operand must be a load or store (or both)");
1098 OS <<
"unknown-size";
1107 assert(PVal &&
"Expected a pseudo source value");
1108 switch (PVal->kind()) {
1119 OS <<
"constant-pool";
1122 int FrameIndex = cast<FixedStackPseudoSourceValue>(PVal)->getFrameIndex();
1123 bool IsFixed =
true;
1128 OS <<
"call-entry ";
1133 OS <<
"call-entry &";
1135 OS, cast<ExternalSymbolPseudoSourceValue>(PVal)->getSymbol());
1159 OS <<
", !alias.scope ";
1163 OS <<
", !noalias ";
1173 OS <<
", addrspace " << AS;
ArrayRef< int > getShuffleMask() const
unsigned getTargetFlags() const
static const char * getTargetFlagName(const TargetInstrInfo *TII, unsigned TF)
void AddPointer(const void *Ptr)
Add* - Add various data types to Bit data.
A parsed version of the target data layout string in and methods for querying it. ...
static void printOperandOffset(raw_ostream &OS, int64_t Offset)
Print the offset with explicit +/- signs.
MachineInstr * getParent()
getParent - Return the instruction that this operand belongs to.
static MachinePointerInfo getJumpTable(MachineFunction &MF)
Return a MachinePointerInfo record that refers to a jump table entry.
unsigned getAddrSpace() const
static const MachineFunction * getMFIfAvailable(const MachineOperand &MO)
Wrapper class representing physical registers. Should be passed by value.
MachineBasicBlock * getMBB() const
MDNode * Scope
The tag for alias scope specification (used with noalias).
void removeRegOperandFromUseList(MachineOperand *MO)
Remove MO from its use-def list.
This class represents lattice values for constants.
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds...
MDNode * TBAA
The tag for type-based alias analysis.
void setTargetFlags(unsigned F)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
A Module instance is used to store all the information related to an LLVM module. ...
bool hasExtraDefRegAllocReq(QueryType Type=AnyInBundle) const
Returns true if this instruction def operands have special register allocation requirements that are ...
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
AtomicOrdering getFailureOrdering() const
For cmpxchg atomic operations, return the atomic ordering requirements when store does not occur...
const Function * getCurrentFunction() const
void ChangeToES(const char *SymName, unsigned TargetFlags=0)
ChangeToES - Replace this operand with a new external symbol operand.
static void printTargetFlags(raw_ostream &OS, const MachineOperand &Op)
Print operand target flags.
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
void setIsDef(bool Val=true)
Change a def to a use, or a use to a def.
void setIsUndef(bool Val=true)
Address of indexed Jump Table for switch.
unsigned getSubReg() const
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
int getLocalSlot(const Value *V)
Return the slot number of the specified local value.
void substVirtReg(Register Reg, unsigned SubIdx, const TargetRegisterInfo &)
substVirtReg - Substitute the current register with the virtual subregister Reg:SubReg.
ArrayRef< std::pair< unsigned, const char * > > getSerializableBitmaskMachineOperandTargetFlags() const override
Return an array that contains the bitmask target flag values and their names.
bool isDereferenceableAndAlignedPointer(const Value *V, Type *Ty, MaybeAlign Alignment, const DataLayout &DL, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr)
Returns true if V is always a dereferenceable pointer with alignment greater or equal than requested...
uint64_t getSize() const
Return the size in bytes of the memory reference.
void printEscapedString(StringRef Name, raw_ostream &Out)
Print each character of the specified string, escaping it if it is not printable or if it is an escap...
MachineMemOperand(MachinePointerInfo PtrInfo, Flags flags, uint64_t s, uint64_t a, const AAMDNodes &AAInfo=AAMDNodes(), const MDNode *Ranges=nullptr, SyncScope::ID SSID=SyncScope::System, AtomicOrdering Ordering=AtomicOrdering::NotAtomic, AtomicOrdering FailureOrdering=AtomicOrdering::NotAtomic)
Construct a MachineMemOperand object with the specified PtrInfo, flags, size, and base alignment...
MachineBasicBlock reference.
unsigned getPointerSizeInBits(unsigned AS=0) const
Layout pointer size, in bits FIXME: The defaults need to be removed once all of the backends/clients ...
void ChangeToGA(const GlobalValue *GV, int64_t Offset, unsigned TargetFlags=0)
ChangeToGA - Replace this operand with a new global address operand.
unsigned const TargetRegisterInfo * TRI
Manage lifetime of a slot tracker for printing IR.
Printable printReg(Register Reg, const TargetRegisterInfo *TRI=nullptr, unsigned SubIdx=0, const MachineRegisterInfo *MRI=nullptr)
Prints virtual and physical registers with or without a TRI instance.
Mask of live-out registers.
uint64_t getBaseAlignment() const
Return the minimum known alignment in bytes of the base address, without the offset.
void setIsRenamable(bool Val=true)
T get() const
Returns the value of the specified pointer type.
bool isInternalRead() const
Mask of preserved registers.
unsigned getAddrSpace() const
Return the LLVM IR address space number that this pointer points into.
Function * getFunction() const
bool isEarlyClobber() const
void ChangeToMCSymbol(MCSymbol *Sym)
ChangeToMCSymbol - Replace this operand with a new MC symbol operand.
static cl::opt< int > PrintRegMaskNumRegs("print-regmask-num-regs", cl::desc("Number of registers to limit to when " "printing regmask operands in IR dumps. " "unlimited = -1"), cl::init(32), cl::Hidden)
AAMDNodes getAAInfo() const
Return the AA tags for the memory reference.
unsigned getAllocaAddrSpace() const
void substPhysReg(MCRegister Reg, const TargetRegisterInfo &)
substPhysReg - Substitute the current register with the physical register Reg, taking any existing Su...
A description of a memory reference used in the backend.
const void * getOpaqueValue() const
StringRef getName(ID id)
Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx".
const HexagonInstrInfo * TII
Printable printMBBReference(const MachineBasicBlock &MBB)
Prints a machine basic block reference.
bool isNonTemporal() const
void Profile(FoldingSetNodeID &ID) const
Profile - Gather unique data for the object.
const uint32_t * getRegLiveOut() const
getRegLiveOut - Returns a bit mask of live-out registers.
const ConstantFP * getFPImm() const
const MDNode * getRanges() const
Return the range tag for the memory reference.
Target-dependent index+offset operand.
Name of external global symbol.
void AddInteger(signed I)
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
static const char * getTargetMMOFlagName(const TargetInstrInfo &TII, unsigned TMMOFlag)
const char * getSymbolName() const
bool isPhysical() const
Return true if the specified register number is in the physical register namespace.
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
unsigned getCFIIndex() const
AtomicOrdering
Atomic ordering for LLVM's memory model.
static const char * getTargetIndexName(const MachineFunction &MF, int Index)
virtual ArrayRef< std::pair< unsigned, const char * > > getSerializableDirectMachineOperandTargetFlags() const
Return an array that contains the direct target flag values and their names.
bool isNull() const
Test if the pointer held in the union is null, regardless of which type it is.
AtomicOrdering getOrdering() const
Return the atomic ordering requirements for this memory operation.
Type * getType() const
All values are typed, get the type of this value.
Immediate >64bit operand.
PseudoSourceValueManager & getPSVManager() const
static void printSyncScope(raw_ostream &OS, const LLVMContext &Context, SyncScope::ID SSID, SmallVectorImpl< StringRef > &SSNs)
Register getSubReg(MCRegister Reg, unsigned Idx) const
Returns the physical register number of sub-register "Index" for physical register RegNo...
int getObjectIndexBegin() const
Return the minimum frame object index.
static void printCFIRegister(unsigned DwarfReg, raw_ostream &OS, const TargetRegisterInfo *TRI)
LLVM_NODISCARD size_t size() const
size - Get the string size.
hash_code hash_value(const APFloat &Arg)
See friend declarations above.
const char * getSubRegIndexName(unsigned SubIdx) const
Return the human-readable symbolic target-specific name for the specified SubRegIndex.
bool isVirtual() const
Return true if the specified register number is in the virtual register namespace.
void setReg(Register Reg)
Change the register this operand corresponds to.
Printable printRegClassOrBank(unsigned Reg, const MachineRegisterInfo &RegInfo, const TargetRegisterInfo *TRI)
Create Printable object to print register classes or register banks on a raw_ostream.
virtual ArrayRef< std::pair< MachineMemOperand::Flags, const char * > > getSerializableMachineMemOperandTargetFlags() const
Return an array that contains the MMO target flag values and their names.
virtual const TargetInstrInfo * getInstrInfo() const
MCSymbol * getLabel() const
const PseudoSourceValue * getFixedStack(int FI)
Return a pseudo source value referencing a fixed stack frame entry, e.g., a spill slot...
const DataLayout & getDataLayout() const
Return the DataLayout attached to the Module associated to this MF.
void ChangeToImmediate(int64_t ImmVal)
ChangeToImmediate - Replace this operand with a new immediate operand of the specified value...
TargetInstrInfo - Interface to description of machine instruction set.
const Value * getValue() const
Return the base address of the memory access.
bool isIdenticalTo(const MachineOperand &Other) const
Returns true if this operand is identical to the specified operand except for liveness related flags ...
Optional< unsigned > getLLVMRegNum(unsigned RegNum, bool isEH) const
Map a dwarf register back to a target register.
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
constexpr uint64_t MinAlign(uint64_t A, uint64_t B)
A and B are either alignments or offsets.
Address of a global value.
unsigned getNumRegs() const
Return the number of registers this target has (useful for sizing arrays holding per register informa...
initializer< Ty > init(const Ty &Val)
static void printIRBlockReference(raw_ostream &OS, const BasicBlock &BB, ModuleSlotTracker &MST)
static MachinePointerInfo getUnknownStack(MachineFunction &MF)
Stack memory without other information.
const char * toIRString(AtomicOrdering ao)
String used by LLVM IR to represent atomic ordering.
unsigned const MachineRegisterInfo * MRI
LLVM Basic Block Representation.
unsigned getRegister2() const
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.
PointerUnion< const Value *, const PseudoSourceValue * > V
This is the IR pointer value for the access, or it is null if unknown.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static StringRef getPredicateName(Predicate P)
This file contains the declarations for the subclasses of Constant, which represent the different fla...
bool isFixedObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a fixed stack object.
unsigned composeSubRegIndices(unsigned a, unsigned b) const
Return the subregister index you get from composing two subregister indices.
const GlobalValue * getGlobal() const
void getSyncScopeNames(SmallVectorImpl< StringRef > &SSNs) const
getSyncScopeNames - Populates client supplied SmallVector with synchronization scope names registered...
ConstantFP - Floating Point Values [float, double].
static void printStackObjectReference(raw_ostream &OS, unsigned FrameIndex, bool IsFixed, StringRef Name)
Print a stack object reference.
Address of a basic block.
OpType getOperation() const
const PseudoSourceValue * getPseudoValue() const
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
bool def_empty(unsigned RegNo) const
def_empty - Return true if there are no instructions defining the specified register (it may be live-...
Printable printJumpTableEntryReference(unsigned Idx)
Prints a jump table entry reference.
auto find_if(R &&Range, UnaryPredicate P) -> decltype(adl_begin(Range))
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly...
void setOffset(int64_t Offset)
StringRef getValues() const
void incorporateFunction(const Function &F)
Incorporate the given function.
static constexpr const Align None()
Returns a default constructed Align which corresponds to no alignment.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
static void printFrameIndex(raw_ostream &OS, int FrameIndex, bool IsFixed, const MachineFrameInfo *MFI)
This class contains a discriminated union of information about pointers in memory operands...
static void printSymbol(raw_ostream &OS, MCSymbol &Sym)
Print a MCSymbol as an operand.
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.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
uint64_t getAlignment() const
Return the minimum known alignment in bytes of the actual memory reference.
static void printIRSlotNumber(raw_ostream &OS, int Slot)
Print an IRSlotNumber.
void refineAlignment(const MachineMemOperand *MMO)
Update this MachineMemOperand to reflect the alignment of MMO, if it has a greater alignment...
Synchronized with respect to all concurrently executing threads.
TargetIntrinsicInfo - Interface to description of machine instruction set.
unsigned getRegister() const
void print(raw_ostream &OS, ModuleSlotTracker &MST, SmallVectorImpl< StringRef > &SSNs, const LLVMContext &Context, const MachineFrameInfo *MFI, const TargetInstrInfo *TII) const
Support for operator<<.
std::pair< unsigned, unsigned > decomposeMachineOperandsTargetFlags(unsigned TF) const override
Decompose the machine operand's target flags into two values - the direct target flag value and any o...
Generic predicate for ISel.
void print(raw_ostream &os, const TargetRegisterInfo *TRI=nullptr, const TargetIntrinsicInfo *IntrinsicInfo=nullptr) const
Print the MachineOperand to os.
MachineOperand class - Representation of each machine instruction operand.
static void printCFI(raw_ostream &OS, const MCCFIInstruction &CFI, const TargetRegisterInfo *TRI)
Intrinsic::ID getIntrinsicID() const
void ChangeToFPImmediate(const ConstantFP *FPImm)
ChangeToFPImmediate - Replace this operand with a new FP immediate operand of the specified value...
A collection of metadata nodes that might be associated with a memory access used by the alias-analys...
void printLLVMNameWithoutPrefix(raw_ostream &OS, StringRef Name)
Print out a name of an LLVM value without any prefixes.
static void tryToGetTargetInfo(const MachineOperand &MO, const TargetRegisterInfo *&TRI, const TargetIntrinsicInfo *&IntrinsicInfo)
MDNode * NoAlias
The tag specifying the noalias scope.
virtual std::string getName(unsigned IID, Type **Tys=nullptr, unsigned numTys=0) const =0
Return the name of a target intrinsic, e.g.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
MCSymbol reference (for debug/eh info)
unsigned Log2_32(uint32_t Value)
Return the floor log base 2 of the specified value, -1 if the value is zero.
bool isIntPredicate() const
const uint32_t * getRegMask() const
getRegMask - Returns a bit mask of registers preserved by this RegMask operand.
Class for arbitrary precision integers.
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
Special value supplied for machine level alias analysis.
const PseudoSourceValue * getJumpTable()
Return a pseudo source value referencing a jump table.
const PseudoSourceValue * getGOT()
Return a pseudo source value referencing the global offset table (or something the like)...
bool isRenamable() const
isRenamable - Returns true if this register may be renamed, i.e.
An opaque object representing a hash code.
static void printSubRegIdx(raw_ostream &OS, uint64_t Index, const TargetRegisterInfo *TRI)
Print a subreg index operand.
Flags
Flags values. These may be or'd together.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
static MachinePointerInfo getFixedStack(MachineFunction &MF, int FI, int64_t Offset=0)
Return a MachinePointerInfo record that refers to the specified FrameIndex.
Representation of each machine instruction.
const AllocaInst * getObjectAllocation(int ObjectIdx) const
Return the underlying Alloca of the specified stack object if it exists.
LLVM_NODISCARD bool empty() const
This file provides utility analysis objects describing memory locations.
StringRef getName() const
Return a constant reference to the value's name.
int64_t getOffset() const
Return the offset from the symbol in this operand.
const Function * getParent() const
Return the enclosing method, or null if none.
const BlockAddress * getBlockAddress() const
bool hasExtraSrcRegAllocReq(QueryType Type=AnyInBundle) const
Returns true if this instruction source operands have special register allocation requirements that a...
Flags getFlags() const
Return the raw flags of the source value,.
void ChangeToRegister(Register Reg, bool isDef, bool isImp=false, bool isKill=false, bool isDead=false, bool isUndef=false, bool isDebug=false)
ChangeToRegister - Replace this operand with a new register operand of the specified value...
void setSubReg(unsigned subReg)
bool isDereferenceable() const
int is() const
Test if the Union currently holds the type matching T.
virtual const MIRFormatter * getMIRFormatter() const
Return MIR formatter to format/parse MIR operands.
void ChangeToTargetIndex(unsigned Idx, int64_t Offset, unsigned TargetFlags=0)
Replace this operand with a target index.
Abstract Stack Frame Index.
static MachinePointerInfo getConstantPool(MachineFunction &MF)
Return a MachinePointerInfo record that refers to the constant pool.
bool isReg() const
isReg - Tests if this is a MO_Register operand.
This file defines passes to print out IR in various granularities.
const PseudoSourceValue * getStack()
Return a pseudo source value referencing the area below the stack frame of a function, e.g., the argument space.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static MachinePointerInfo getGOT(MachineFunction &MF)
Return a MachinePointerInfo record that refers to a GOT entry.
MCSymbol * getMCSymbol() const
int64_t getOffset() const
For normal values, this is a byte offset added to the base address.
LLVM Value Representation.
Floating-point immediate operand.
SyncScope::ID getSyncScopeID() const
Returns the synchronization scope ID for this memory operation.
static bool isVirtualRegister(unsigned Reg)
Return true if the specified register number is in the virtual register namespace.
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.
bool isDereferenceable(unsigned Size, LLVMContext &C, const DataLayout &DL) const
Return true if memory region [V, V+Offset+Size) is known to be dereferenceable.
void ChangeToFrameIndex(int Idx)
Replace this operand with a frame index.
This class implements an extremely fast bulk output stream that can only output to a stream...
static MachinePointerInfo getStack(MachineFunction &MF, int64_t Offset, uint8_t ID=0)
Stack pointer relative access.
StringRef - Represent a constant reference to a string, i.e.
Address of indexed Constant in Constant Pool.
Register getReg() const
getReg - Returns the register number.
const ConstantInt * getCImm() const
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
Other IR Constant for ISel (shuffle masks)
const PseudoSourceValue * getConstantPool()
Return a pseudo source value referencing the constant pool.
const MDNode * getMetadata() const
Wrapper class representing virtual and physical registers.
an instruction to allocate memory on the stack
Metadata reference (for debug info)
unsigned getPredicate() const
void addRegOperandToUseList(MachineOperand *MO)
Add MO to the linked list of operands for its register.