24 #include "llvm/Config/llvm-config.h" 35 cl::desc(
"Number of registers to limit to when " 36 "printing regmask operands in IR dumps. " 65 SmallContents.RegNo =
Reg;
71 SmallContents.RegNo =
Reg;
100 assert((!Val || !
isDebug()) &&
"Marking a debug operation as def");
103 assert(!IsDeadOrKill &&
"Changing def/use with dead/kill set not supported");
116 assert(
isReg() &&
"Wrong MachineOperand accessor");
118 "isRenamable should only be checked on physical registers");
134 assert(
isReg() &&
"Wrong MachineOperand accessor");
136 "setIsRenamable should only be called on physical registers");
142 void MachineOperand::removeRegFromUses() {
143 if (!
isReg() || !isOnRegUseList())
147 MF->getRegInfo().removeRegOperandFromUseList(
this);
168 Contents.CFP = FPImm;
174 "Cannot change a tied operand into an external symbol");
179 Contents.OffsetedInfo.Val.SymbolName = SymName;
186 "Cannot change a tied operand into an MCSymbol");
196 "Cannot change a tied operand into a FrameIndex");
207 "Cannot change a tied operand into a FrameIndex");
225 RegInfo = &MF->getRegInfo();
228 bool WasReg =
isReg();
229 if (RegInfo && WasReg)
233 assert(!(isDead && !isDef) &&
"Dead flag on non-def");
234 assert(!(isKill && isDef) &&
"Kill flag on def");
236 SmallContents.RegNo =
Reg;
237 SubReg_TargetFlags = 0;
240 IsDeadOrKill = isKill |
isDead;
243 IsInternalRead =
false;
244 IsEarlyClobber =
false;
247 Contents.Reg.Prev =
nullptr;
298 if (RegMask == OtherRegMask)
304 unsigned RegMaskSize = (TRI->
getNumRegs() + 31) / 32;
307 return std::equal(RegMask, RegMask + RegMaskSize, OtherRegMask);
381 TRI = MF->getSubtarget().getRegisterInfo();
382 IntrinsicInfo = MF->getTarget().getIntrinsicInfo();
388 assert(
TII &&
"expected instruction info");
389 auto Indices =
TII->getSerializableTargetIndices();
390 auto Found =
find_if(Indices, [&](
const std::pair<int, const char *> &
I) {
391 return I.first ==
Index;
393 if (Found != Indices.end())
394 return Found->second;
400 for (
const auto &
I : Flags) {
411 OS <<
"%dwarfreg." << DwarfReg;
434 }
else if (
const Module *M =
F->getParent()) {
448 if (isa<GlobalValue>(V)) {
452 if (isa<Constant>(V)) {
478 OS <<
"syncscope(\"";
488 for (
const auto &
I : Flags) {
489 if (
I.first == TMMOFlag) {
502 if (Alloca->hasName())
503 Name = Alloca->getName();
528 assert(
TII &&
"expected instruction info");
530 OS <<
"target-flags(";
531 const bool HasDirectFlags = Flags.first;
532 const bool HasBitmaskFlags = Flags.second;
533 if (!HasDirectFlags && !HasBitmaskFlags) {
537 if (HasDirectFlags) {
541 OS <<
"<unknown target flag>";
543 if (!HasBitmaskFlags) {
547 bool IsCommaNeeded = HasDirectFlags;
548 unsigned BitMask = Flags.second;
550 for (
const auto &
Mask : BitMasks) {
552 if ((BitMask &
Mask.first) ==
Mask.first) {
555 IsCommaNeeded =
true;
558 BitMask &= ~(
Mask.first);
566 OS <<
"<unknown bitmask target flag>";
572 OS <<
"<mcsymbol " << Sym <<
">";
615 OS <<
"remember_state ";
620 OS <<
"restore_state ";
632 OS <<
"def_cfa_register ";
638 OS <<
"def_cfa_offset ";
658 OS <<
"adjust_cfa_offset ";
675 for (
size_t i = 0; i < e; ++i)
696 OS <<
"window_save ";
701 OS <<
"negate_ra_sign_state ";
707 OS <<
"<unserializable cfi directive>";
722 print(OS, DummyMST, TypeToPrint,
false,
true,
724 0, TRI, IntrinsicInfo);
728 LLT TypeToPrint,
bool PrintDef,
bool IsStandalone,
729 bool ShouldPrintRegisterTies,
730 unsigned TiedOperandIdx,
738 OS << (
isDef() ?
"implicit-def " :
"implicit ");
739 else if (PrintDef &&
isDef())
751 OS <<
"early-clobber ";
760 MRI = &MF->getRegInfo();
770 OS <<
".subreg" <<
SubReg;
776 if (IsStandalone || !PrintDef || MRI.
def_empty(Reg)) {
783 if (ShouldPrintRegisterTies &&
isTied() && !
isDef())
784 OS <<
"(tied-def " << TiedOperandIdx <<
")";
787 OS <<
'(' << TypeToPrint <<
')';
804 bool IsFixed =
false;
807 MFI = &MF->getFrameInfo();
816 OS <<
"target-index(";
817 const char *
Name =
"<unknown>";
820 Name = TargetIndexName;
844 OS <<
"blockaddress(";
856 unsigned NumRegsInMask = 0;
857 unsigned NumRegsEmitted = 0;
858 for (
unsigned i = 0; i < TRI->
getNumRegs(); ++i) {
859 unsigned MaskWord = i / 32;
860 unsigned MaskBit = i % 32;
861 if (
getRegMask()[MaskWord] & (1 << MaskBit)) {
870 if (NumRegsEmitted != NumRegsInMask)
871 OS <<
" and " << (NumRegsInMask - NumRegsEmitted) <<
" more...";
884 bool IsCommaNeeded =
false;
886 if (RegMask[
Reg / 32] & (1U << (
Reg % 32))) {
890 IsCommaNeeded =
true;
907 OS <<
"<cfi directive>";
914 else if (IntrinsicInfo)
915 OS <<
"intrinsic(@" << IntrinsicInfo->
getName(ID) <<
')';
917 OS <<
"intrinsic(" << ID <<
')';
929 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 945 if (!V.is<
const Value *>())
948 const Value *BasePtr = V.get<
const Value *>();
949 if (BasePtr ==
nullptr)
987 uint64_t s, uint64_t a,
992 : PtrInfo(ptrinfo),
Size(s), FlagVals(f), BaseAlignLog2(
Log2_32(a) + 1),
993 AAInfo(AAInfo), Ranges(Ranges) {
996 "invalid pointer value");
1000 AtomicInfo.SSID =
static_cast<unsigned>(SSID);
1002 AtomicInfo.Ordering =
static_cast<unsigned>(Ordering);
1004 AtomicInfo.FailureOrdering =
static_cast<unsigned>(FailureOrdering);
1029 PtrInfo = MMO->PtrInfo;
1041 print(OS, DummyMST);
1047 print(OS, MST, SSNs, Ctx,
nullptr,
nullptr);
1059 OS <<
"non-temporal ";
1061 OS <<
"dereferenceable ";
1075 "machine memory operand must be a load or store (or both)");
1089 OS <<
"unknown-size";
1098 assert(PVal &&
"Expected a pseudo source value");
1099 switch (PVal->kind()) {
1110 OS <<
"constant-pool";
1113 int FrameIndex = cast<FixedStackPseudoSourceValue>(PVal)->getFrameIndex();
1114 bool IsFixed =
true;
1119 OS <<
"call-entry ";
1124 OS <<
"call-entry &";
1126 OS, cast<ExternalSymbolPseudoSourceValue>(PVal)->
getSymbol());
1134 PVal->printCustom(OS);
1147 OS <<
", !alias.scope ";
1151 OS <<
", !noalias ";
1161 OS <<
", addrspace " << AS;
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)
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.
MDNode * TBAA
The tag for type-based alias analysis.
void setTargetFlags(unsigned F)
void ChangeToRegister(unsigned 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...
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 ...
AtomicOrdering getFailureOrdering() const
For cmpxchg atomic operations, return the atomic ordering requirements when store does not occur...
const Function * getCurrentFunction() const
static void printTargetFlags(raw_ostream &OS, const MachineOperand &Op)
Print operand target flags.
void setIsDef(bool Val=true)
Change a def to a use, or a use to a def.
unsigned getReg() const
getReg - Returns the register number.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
void setIsUndef(bool Val=true)
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.
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.
ArrayRef< std::pair< unsigned, const char * > > getSerializableBitmaskMachineOperandTargetFlags() const override
Return an array that contains the bitmask target flag values and their names.
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 ...
unsigned const TargetRegisterInfo * TRI
Manage lifetime of a slot tracker for printing IR.
Mask of live-out registers.
void substVirtReg(unsigned Reg, unsigned SubIdx, const TargetRegisterInfo &)
substVirtReg - Substitute the current register with the virtual subregister Reg:SubReg.
uint64_t getBaseAlignment() const
Return the minimum known alignment in bytes of the base address, without the offset.
void print(raw_ostream &OS) const
Support for operator<<.
void setIsRenamable(bool Val=true)
bool isInternalRead() const
bool isNull() const
Test if the pointer held in the union is null, regardless of which type it is.
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
A description of a memory reference used in the backend.
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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
Printable printReg(unsigned Reg, const TargetRegisterInfo *TRI=nullptr, unsigned SubIdx=0, const MachineRegisterInfo *MRI=nullptr)
Prints virtual and physical registers with or without a TRI instance.
const MDNode * getRanges() const
Return the range tag for the memory reference.
void ChangeToES(const char *SymName, unsigned char TargetFlags=0)
ChangeToES - Replace this operand with a new external symbol operand.
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
unsigned getCFIIndex() const
union llvm::MachineOperand::@164::@167::@168 Val
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.
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)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
int getObjectIndexBegin() const
Return the minimum frame object index.
static void printCFIRegister(unsigned DwarfReg, raw_ostream &OS, const TargetRegisterInfo *TRI)
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.
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
Expected< const typename ELFT::Sym * > getSymbol(typename ELFT::SymRange Symbols, uint32_t Index)
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 ...
struct llvm::MachineOperand::@164::@166 Reg
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].
unsigned getSubReg(unsigned Reg, unsigned Idx) const
Returns the physical register number of sub-register "Index" for physical register RegNo...
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.
void substPhysReg(unsigned Reg, const TargetRegisterInfo &)
substPhysReg - Substitute the current register with the physical register Reg, taking any existing Su...
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.
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...
TargetIntrinsicInfo - Interface to description of machine instruction set.
unsigned getRegister() const
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.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
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.
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
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
void setReg(unsigned Reg)
Change the register this operand corresponds to.
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 setSubReg(unsigned subReg)
bool isDereferenceable() const
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.
T get() const
Returns the value of the specified pointer type.
void ChangeToTargetIndex(unsigned Idx, int64_t Offset, unsigned char TargetFlags=0)
Replace this operand with a target index.
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.
Synchronized with respect to all concurrently executing threads.
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.
int is() const
Test if the Union currently holds the type matching T.
Address of indexed Constant in Constant Pool.
bool isDereferenceableAndAlignedPointer(const Value *V, unsigned Align, 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...
const ConstantInt * getCImm() const
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
const PseudoSourceValue * getConstantPool()
Return a pseudo source value referencing the constant pool.
int getLLVMRegNum(unsigned RegNum, bool isEH) const
Map a dwarf register back to a target register.
const MDNode * getMetadata() const
an instruction to allocate memory on the stack
static void printIRValueReference(raw_ostream &OS, const Value &V, ModuleSlotTracker &MST)
Metadata reference (for debug info)
unsigned getPredicate() const
void addRegOperandToUseList(MachineOperand *MO)
Add MO to the linked list of operands for its register.