LLVM  13.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::MachineOperand Class Reference

MachineOperand class - Representation of each machine instruction operand. More...

#include "llvm/CodeGen/MachineOperand.h"

Collaboration diagram for llvm::MachineOperand:
Collaboration graph
[legend]

Public Types

enum  MachineOperandType : unsigned char {
  MO_Register, MO_Immediate, MO_CImmediate, MO_FPImmediate,
  MO_MachineBasicBlock, MO_FrameIndex, MO_ConstantPoolIndex, MO_TargetIndex,
  MO_JumpTableIndex, MO_ExternalSymbol, MO_GlobalAddress, MO_BlockAddress,
  MO_RegisterMask, MO_RegisterLiveOut, MO_Metadata, MO_MCSymbol,
  MO_CFIIndex, MO_IntrinsicID, MO_Predicate, MO_ShuffleMask,
  MO_Last = MO_ShuffleMask
}
 

Public Member Functions

MachineOperandType getType () const
 getType - Returns the MachineOperandType for this operand. More...
 
unsigned getTargetFlags () const
 
void setTargetFlags (unsigned F)
 
void addTargetFlag (unsigned F)
 
MachineInstrgetParent ()
 getParent - Return the instruction that this operand belongs to. More...
 
const MachineInstrgetParent () const
 
void clearParent ()
 clearParent - Reset the parent pointer. More...
 
void print (raw_ostream &os, const TargetRegisterInfo *TRI=nullptr, const TargetIntrinsicInfo *IntrinsicInfo=nullptr) const
 Print the MachineOperand to os. More...
 
void print (raw_ostream &os, ModuleSlotTracker &MST, LLT TypeToPrint, Optional< unsigned > OpIdx, bool PrintDef, bool IsStandalone, bool ShouldPrintRegisterTies, unsigned TiedOperandIdx, const TargetRegisterInfo *TRI, const TargetIntrinsicInfo *IntrinsicInfo) const
 More complex way of printing a MachineOperand. More...
 
void print (raw_ostream &os, LLT TypeToPrint, const TargetRegisterInfo *TRI=nullptr, const TargetIntrinsicInfo *IntrinsicInfo=nullptr) const
 Same as print(os, TRI, IntrinsicInfo), but allows to specify the low-level type to be printed the same way the full version of print(...) does it. More...
 
void dump () const
 
bool isReg () const
 isReg - Tests if this is a MO_Register operand. More...
 
bool isImm () const
 isImm - Tests if this is a MO_Immediate operand. More...
 
bool isCImm () const
 isCImm - Test if this is a MO_CImmediate operand. More...
 
bool isFPImm () const
 isFPImm - Tests if this is a MO_FPImmediate operand. More...
 
bool isMBB () const
 isMBB - Tests if this is a MO_MachineBasicBlock operand. More...
 
bool isFI () const
 isFI - Tests if this is a MO_FrameIndex operand. More...
 
bool isCPI () const
 isCPI - Tests if this is a MO_ConstantPoolIndex operand. More...
 
bool isTargetIndex () const
 isTargetIndex - Tests if this is a MO_TargetIndex operand. More...
 
bool isJTI () const
 isJTI - Tests if this is a MO_JumpTableIndex operand. More...
 
bool isGlobal () const
 isGlobal - Tests if this is a MO_GlobalAddress operand. More...
 
bool isSymbol () const
 isSymbol - Tests if this is a MO_ExternalSymbol operand. More...
 
bool isBlockAddress () const
 isBlockAddress - Tests if this is a MO_BlockAddress operand. More...
 
bool isRegMask () const
 isRegMask - Tests if this is a MO_RegisterMask operand. More...
 
bool isRegLiveOut () const
 isRegLiveOut - Tests if this is a MO_RegisterLiveOut operand. More...
 
bool isMetadata () const
 isMetadata - Tests if this is a MO_Metadata operand. More...
 
bool isMCSymbol () const
 
bool isCFIIndex () const
 
bool isIntrinsicID () const
 
bool isPredicate () const
 
bool isShuffleMask () const
 
Register getReg () const
 getReg - Returns the register number. More...
 
unsigned getSubReg () const
 
bool isUse () const
 
bool isDef () const
 
bool isImplicit () const
 
bool isDead () const
 
bool isKill () const
 
bool isUndef () const
 
bool isRenamable () const
 isRenamable - Returns true if this register may be renamed, i.e. More...
 
bool isInternalRead () const
 
bool isEarlyClobber () const
 
bool isTied () const
 
bool isDebug () const
 
bool readsReg () const
 readsReg - Returns true if this operand reads the previous value of its register. More...
 
void setReg (Register Reg)
 Change the register this operand corresponds to. More...
 
void setSubReg (unsigned subReg)
 
void substVirtReg (Register Reg, unsigned SubIdx, const TargetRegisterInfo &)
 substVirtReg - Substitute the current register with the virtual subregister Reg:SubReg. More...
 
void substPhysReg (MCRegister Reg, const TargetRegisterInfo &)
 substPhysReg - Substitute the current register with the physical register Reg, taking any existing SubReg into account. More...
 
void setIsUse (bool Val=true)
 
void setIsDef (bool Val=true)
 Change a def to a use, or a use to a def. More...
 
void setImplicit (bool Val=true)
 
void setIsKill (bool Val=true)
 
void setIsDead (bool Val=true)
 
void setIsUndef (bool Val=true)
 
void setIsRenamable (bool Val=true)
 
void setIsInternalRead (bool Val=true)
 
void setIsEarlyClobber (bool Val=true)
 
void setIsDebug (bool Val=true)
 
int64_t getImm () const
 
const ConstantIntgetCImm () const
 
const ConstantFPgetFPImm () const
 
MachineBasicBlockgetMBB () const
 
int getIndex () const
 
const GlobalValuegetGlobal () const
 
const BlockAddressgetBlockAddress () const
 
MCSymbolgetMCSymbol () const
 
unsigned getCFIIndex () const
 
Intrinsic::ID getIntrinsicID () const
 
unsigned getPredicate () const
 
ArrayRef< intgetShuffleMask () const
 
int64_t getOffset () const
 Return the offset from the symbol in this operand. More...
 
const char * getSymbolName () const
 
bool clobbersPhysReg (MCRegister PhysReg) const
 clobbersPhysReg - Returns true if this RegMask operand clobbers PhysReg. More...
 
const uint32_tgetRegMask () const
 getRegMask - Returns a bit mask of registers preserved by this RegMask operand. More...
 
const uint32_tgetRegLiveOut () const
 getRegLiveOut - Returns a bit mask of live-out registers. More...
 
const MDNodegetMetadata () const
 
void setImm (int64_t immVal)
 
void setCImm (const ConstantInt *CI)
 
void setFPImm (const ConstantFP *CFP)
 
void setOffset (int64_t Offset)
 
void setIndex (int Idx)
 
void setMetadata (const MDNode *MD)
 
void setMBB (MachineBasicBlock *MBB)
 
void setRegMask (const uint32_t *RegMaskPtr)
 Sets value of register mask operand referencing Mask. More...
 
void setIntrinsicID (Intrinsic::ID IID)
 
void setPredicate (unsigned Predicate)
 
bool isIdenticalTo (const MachineOperand &Other) const
 Returns true if this operand is identical to the specified operand except for liveness related flags (isKill, isUndef and isDead). More...
 
void ChangeToImmediate (int64_t ImmVal, unsigned TargetFlags=0)
 ChangeToImmediate - Replace this operand with a new immediate operand of the specified value. More...
 
void ChangeToFPImmediate (const ConstantFP *FPImm, unsigned TargetFlags=0)
 ChangeToFPImmediate - Replace this operand with a new FP immediate operand of the specified value. More...
 
void ChangeToES (const char *SymName, unsigned TargetFlags=0)
 ChangeToES - Replace this operand with a new external symbol operand. More...
 
void ChangeToGA (const GlobalValue *GV, int64_t Offset, unsigned TargetFlags=0)
 ChangeToGA - Replace this operand with a new global address operand. More...
 
void ChangeToMCSymbol (MCSymbol *Sym, unsigned TargetFlags=0)
 ChangeToMCSymbol - Replace this operand with a new MC symbol operand. More...
 
void ChangeToFrameIndex (int Idx, unsigned TargetFlags=0)
 Replace this operand with a frame index. More...
 
void ChangeToTargetIndex (unsigned Idx, int64_t Offset, unsigned TargetFlags=0)
 Replace this operand with a target index. More...
 
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. More...
 
const char * getTargetIndexName () const
 getTargetIndexName - If this MachineOperand is a TargetIndex that has a name, attempt to get the name. More...
 

Static Public Member Functions

static void printSubRegIdx (raw_ostream &OS, uint64_t Index, const TargetRegisterInfo *TRI)
 Print a subreg index operand. More...
 
static void printTargetFlags (raw_ostream &OS, const MachineOperand &Op)
 Print operand target flags. More...
 
static void printSymbol (raw_ostream &OS, MCSymbol &Sym)
 Print a MCSymbol as an operand. More...
 
static void printStackObjectReference (raw_ostream &OS, unsigned FrameIndex, bool IsFixed, StringRef Name)
 Print a stack object reference. More...
 
static void printOperandOffset (raw_ostream &OS, int64_t Offset)
 Print the offset with explicit +/- signs. More...
 
static void printIRSlotNumber (raw_ostream &OS, int Slot)
 Print an IRSlotNumber. More...
 
static bool clobbersPhysReg (const uint32_t *RegMask, MCRegister PhysReg)
 clobbersPhysReg - Returns true if this RegMask clobbers PhysReg. More...
 
static unsigned getRegMaskSize (unsigned NumRegs)
 Returns number of elements needed for a regmask array. More...
 
static MachineOperand CreateImm (int64_t Val)
 
static MachineOperand CreateCImm (const ConstantInt *CI)
 
static MachineOperand CreateFPImm (const ConstantFP *CFP)
 
static MachineOperand CreateReg (Register Reg, bool isDef, bool isImp=false, bool isKill=false, bool isDead=false, bool isUndef=false, bool isEarlyClobber=false, unsigned SubReg=0, bool isDebug=false, bool isInternalRead=false, bool isRenamable=false)
 
static MachineOperand CreateMBB (MachineBasicBlock *MBB, unsigned TargetFlags=0)
 
static MachineOperand CreateFI (int Idx)
 
static MachineOperand CreateCPI (unsigned Idx, int Offset, unsigned TargetFlags=0)
 
static MachineOperand CreateTargetIndex (unsigned Idx, int64_t Offset, unsigned TargetFlags=0)
 
static MachineOperand CreateJTI (unsigned Idx, unsigned TargetFlags=0)
 
static MachineOperand CreateGA (const GlobalValue *GV, int64_t Offset, unsigned TargetFlags=0)
 
static MachineOperand CreateES (const char *SymName, unsigned TargetFlags=0)
 
static MachineOperand CreateBA (const BlockAddress *BA, int64_t Offset, unsigned TargetFlags=0)
 
static MachineOperand CreateRegMask (const uint32_t *Mask)
 CreateRegMask - Creates a register mask operand referencing Mask. More...
 
static MachineOperand CreateRegLiveOut (const uint32_t *Mask)
 
static MachineOperand CreateMetadata (const MDNode *Meta)
 
static MachineOperand CreateMCSymbol (MCSymbol *Sym, unsigned TargetFlags=0)
 
static MachineOperand CreateCFIIndex (unsigned CFIIndex)
 
static MachineOperand CreateIntrinsicID (Intrinsic::ID ID)
 
static MachineOperand CreatePredicate (unsigned Pred)
 
static MachineOperand CreateShuffleMask (ArrayRef< int > Mask)
 

Friends

class MachineInstr
 
class MachineRegisterInfo
 
struct DenseMapInfo< MachineOperand >
 
hash_code hash_value (const MachineOperand &MO)
 MachineOperand hash_value overload. More...
 

Detailed Description

MachineOperand class - Representation of each machine instruction operand.

This class isn't a POD type because it has a private constructor, but its destructor must be trivial. Functions like MachineInstr::addOperand(), MachineRegisterInfo::moveOperands(), and MF::DeleteMachineInstr() depend on not having to call the MachineOperand destructor.

Definition at line 49 of file MachineOperand.h.

Member Enumeration Documentation

◆ MachineOperandType

Enumerator
MO_Register 

Register operand.

MO_Immediate 

Immediate operand.

MO_CImmediate 

Immediate >64bit operand.

MO_FPImmediate 

Floating-point immediate operand.

MO_MachineBasicBlock 

MachineBasicBlock reference.

MO_FrameIndex 

Abstract Stack Frame Index.

MO_ConstantPoolIndex 

Address of indexed Constant in Constant Pool.

MO_TargetIndex 

Target-dependent index+offset operand.

MO_JumpTableIndex 

Address of indexed Jump Table for switch.

MO_ExternalSymbol 

Name of external global symbol.

MO_GlobalAddress 

Address of a global value.

MO_BlockAddress 

Address of a basic block.

MO_RegisterMask 

Mask of preserved registers.

MO_RegisterLiveOut 

Mask of live-out registers.

MO_Metadata 

Metadata reference (for debug info)

MO_MCSymbol 

MCSymbol reference (for debug/eh info)

MO_CFIIndex 

MCCFIInstruction index.

MO_IntrinsicID 

Intrinsic ID for ISel.

MO_Predicate 

Generic predicate for ISel.

MO_ShuffleMask 

Other IR Constant for ISel (shuffle masks)

MO_Last 

Definition at line 51 of file MachineOperand.h.

Member Function Documentation

◆ addTargetFlag()

void llvm::MachineOperand::addTargetFlag ( unsigned  F)
inline

Definition at line 226 of file MachineOperand.h.

References assert(), F, and isReg().

Referenced by llvm::HexagonInstrInfo::immediateExtend().

◆ ChangeToES()

void MachineOperand::ChangeToES ( const char *  SymName,
unsigned  TargetFlags = 0 
)

ChangeToES - Replace this operand with a new external symbol operand.

Definition at line 177 of file MachineOperand.cpp.

References assert(), isReg(), isTied(), MO_ExternalSymbol, setOffset(), and setTargetFlags().

◆ ChangeToFPImmediate()

void MachineOperand::ChangeToFPImmediate ( const ConstantFP FPImm,
unsigned  TargetFlags = 0 
)

ChangeToFPImmediate - Replace this operand with a new FP immediate operand of the specified value.

If an operand is known to be an FP immediate already, the setFPImm method should be used.

Definition at line 166 of file MachineOperand.cpp.

References assert(), isReg(), isTied(), MO_FPImmediate, and setTargetFlags().

◆ ChangeToFrameIndex()

void MachineOperand::ChangeToFrameIndex ( int  Idx,
unsigned  TargetFlags = 0 
)

Replace this operand with a frame index.

Definition at line 214 of file MachineOperand.cpp.

References assert(), isReg(), isTied(), MO_FrameIndex, setIndex(), and setTargetFlags().

Referenced by foldImmediates(), swapRegAndNonRegOperand(), and updateOperand().

◆ ChangeToGA()

void MachineOperand::ChangeToGA ( const GlobalValue GV,
int64_t  Offset,
unsigned  TargetFlags = 0 
)

ChangeToGA - Replace this operand with a new global address operand.

Definition at line 190 of file MachineOperand.cpp.

References assert(), isReg(), isTied(), MO_GlobalAddress, Offset, setOffset(), and setTargetFlags().

Referenced by foldImmediates(), swapRegAndNonRegOperand(), and updateOperand().

◆ ChangeToImmediate()

void MachineOperand::ChangeToImmediate ( int64_t  ImmVal,
unsigned  TargetFlags = 0 
)

◆ ChangeToMCSymbol()

void MachineOperand::ChangeToMCSymbol ( MCSymbol Sym,
unsigned  TargetFlags = 0 
)

ChangeToMCSymbol - Replace this operand with a new MC symbol operand.

Definition at line 203 of file MachineOperand.cpp.

References assert(), isReg(), isTied(), MO_MCSymbol, and setTargetFlags().

◆ ChangeToRegister()

void MachineOperand::ChangeToRegister ( Register  Reg,
bool  isDef,
bool  isImp = false,
bool  isKill = false,
bool  isDead = false,
bool  isUndef = false,
bool  isDebug = false 
)

◆ ChangeToTargetIndex()

void MachineOperand::ChangeToTargetIndex ( unsigned  Idx,
int64_t  Offset,
unsigned  TargetFlags = 0 
)

Replace this operand with a target index.

Definition at line 225 of file MachineOperand.cpp.

References assert(), isReg(), isTied(), MO_TargetIndex, Offset, setIndex(), setOffset(), and setTargetFlags().

◆ clearParent()

void llvm::MachineOperand::clearParent ( )
inline

clearParent - Reset the parent pointer.

The MachineOperand copy constructor also copies ParentMI, expecting the original to be deleted. If a MachineOperand is ever stored outside a MachineInstr, the parent pointer must be cleared.

Never call clearParent() on an operand in a MachineInstr.

Definition at line 246 of file MachineOperand.h.

◆ clobbersPhysReg() [1/2]

static bool llvm::MachineOperand::clobbersPhysReg ( const uint32_t RegMask,
MCRegister  PhysReg 
)
inlinestatic

◆ clobbersPhysReg() [2/2]

bool llvm::MachineOperand::clobbersPhysReg ( MCRegister  PhysReg) const
inline

clobbersPhysReg - Returns true if this RegMask operand clobbers PhysReg.

Definition at line 621 of file MachineOperand.h.

References clobbersPhysReg(), and getRegMask().

◆ CreateBA()

static MachineOperand llvm::MachineOperand::CreateBA ( const BlockAddress BA,
int64_t  Offset,
unsigned  TargetFlags = 0 
)
inlinestatic

Definition at line 863 of file MachineOperand.h.

References MO_BlockAddress, and Offset.

Referenced by llvm::MachineInstrBuilder::addBlockAddress().

◆ CreateCFIIndex()

static MachineOperand llvm::MachineOperand::CreateCFIIndex ( unsigned  CFIIndex)
inlinestatic

Definition at line 910 of file MachineOperand.h.

References MO_CFIIndex.

Referenced by llvm::MachineInstrBuilder::addCFIIndex().

◆ CreateCImm()

static MachineOperand llvm::MachineOperand::CreateCImm ( const ConstantInt CI)
inlinestatic

◆ CreateCPI()

static MachineOperand llvm::MachineOperand::CreateCPI ( unsigned  Idx,
int  Offset,
unsigned  TargetFlags = 0 
)
inlinestatic

◆ CreateES()

static MachineOperand llvm::MachineOperand::CreateES ( const char *  SymName,
unsigned  TargetFlags = 0 
)
inlinestatic

◆ CreateFI()

static MachineOperand llvm::MachineOperand::CreateFI ( int  Idx)
inlinestatic

◆ CreateFPImm()

static MachineOperand llvm::MachineOperand::CreateFPImm ( const ConstantFP CFP)
inlinestatic

◆ CreateGA()

static MachineOperand llvm::MachineOperand::CreateGA ( const GlobalValue GV,
int64_t  Offset,
unsigned  TargetFlags = 0 
)
inlinestatic

◆ CreateImm()

static MachineOperand llvm::MachineOperand::CreateImm ( int64_t  Val)
inlinestatic

◆ CreateIntrinsicID()

static MachineOperand llvm::MachineOperand::CreateIntrinsicID ( Intrinsic::ID  ID)
inlinestatic

Definition at line 916 of file MachineOperand.h.

References MO_IntrinsicID.

Referenced by llvm::MachineInstrBuilder::addIntrinsicID().

◆ CreateJTI()

static MachineOperand llvm::MachineOperand::CreateJTI ( unsigned  Idx,
unsigned  TargetFlags = 0 
)
inlinestatic

Definition at line 841 of file MachineOperand.h.

References MO_JumpTableIndex.

Referenced by llvm::MachineInstrBuilder::addJumpTableIndex().

◆ CreateMBB()

static MachineOperand llvm::MachineOperand::CreateMBB ( MachineBasicBlock MBB,
unsigned  TargetFlags = 0 
)
inlinestatic

◆ CreateMCSymbol()

static MachineOperand llvm::MachineOperand::CreateMCSymbol ( MCSymbol Sym,
unsigned  TargetFlags = 0 
)
inlinestatic

Definition at line 901 of file MachineOperand.h.

References MO_MCSymbol.

Referenced by llvm::MachineInstrBuilder::addSym().

◆ CreateMetadata()

static MachineOperand llvm::MachineOperand::CreateMetadata ( const MDNode Meta)
inlinestatic

Definition at line 895 of file MachineOperand.h.

References MO_Metadata.

Referenced by llvm::MachineInstrBuilder::addMetadata().

◆ CreatePredicate()

static MachineOperand llvm::MachineOperand::CreatePredicate ( unsigned  Pred)
inlinestatic

Definition at line 922 of file MachineOperand.h.

References MO_Predicate.

Referenced by llvm::MachineInstrBuilder::addPredicate().

◆ CreateReg()

static MachineOperand llvm::MachineOperand::CreateReg ( Register  Reg,
bool  isDef,
bool  isImp = false,
bool  isKill = false,
bool  isDead = false,
bool  isUndef = false,
bool  isEarlyClobber = false,
unsigned  SubReg = 0,
bool  isDebug = false,
bool  isInternalRead = false,
bool  isRenamable = false 
)
inlinestatic

Definition at line 788 of file MachineOperand.h.

References assert(), isDead(), isDebug(), isDef(), isEarlyClobber(), isInternalRead(), isKill(), isRenamable(), isUndef(), MO_Register, Reg, and SubReg.

Referenced by llvm::SITargetLowering::AddIMGInit(), llvm::MachineInstr::addImplicitDefUseOperands(), llvm::GISelInstProfileBuilder::addNodeIDRegType(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstr::addRegisterDead(), llvm::MachineInstr::addRegisterDefined(), llvm::MachineInstr::addRegisterKilled(), llvm::R600InstrInfo::analyzeBranch(), llvm::PPCInstrInfo::analyzeBranch(), llvm::SIInstrInfo::buildExtractSubRegOrImm(), llvm::condCodeOp(), convertImplicitDefToConstZero(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::MipsInstrInfo::describeLoadedValue(), llvm::TargetInstrInfo::describeLoadedValue(), describeMOVrrLoadedValue(), describeORRLoadedValue(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::HexagonFrameLowering::emitPrologue(), expandSGPRCopy(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::X86AddressMode::getFullAddress(), imposeStackOrdering(), INITIALIZE_PASS(), llvm::SIInstrInfo::legalizeGenericOperand(), llvm::CallLowering::lowerCall(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::PeelingModuloScheduleExpander::peelPrologAndEpilogs(), llvm::predOps(), llvm::rewriteT2FrameIndex(), llvm::FastISel::selectIntrinsicCall(), llvm::FastISel::selectPatchpoint(), llvm::FastISel::selectStackmap(), llvm::FastISel::selectXRayCustomEvent(), llvm::FastISel::selectXRayTypedEvent(), llvm::t1CondCodeOp(), and llvm::tryFoldSPUpdateIntoPushPop().

◆ CreateRegLiveOut()

static MachineOperand llvm::MachineOperand::CreateRegLiveOut ( const uint32_t Mask)
inlinestatic

Definition at line 889 of file MachineOperand.h.

References assert(), llvm::BitmaskEnumDetail::Mask(), and MO_RegisterLiveOut.

◆ CreateRegMask()

static MachineOperand llvm::MachineOperand::CreateRegMask ( const uint32_t Mask)
inlinestatic

CreateRegMask - Creates a register mask operand referencing Mask.

The operand does not take ownership of the memory referenced by Mask, it must remain valid for the lifetime of the operand.

A RegMask operand represents a set of non-clobbered physical registers on an instruction that clobbers many registers, typically a call. The bit mask has a bit set for each physreg that is preserved by this instruction, as described in the documentation for TargetRegisterInfo::getCallPreservedMask().

Any physreg with a 0 bit in the mask is clobbered by the instruction.

Definition at line 883 of file MachineOperand.h.

References assert(), llvm::BitmaskEnumDetail::Mask(), and MO_RegisterMask.

Referenced by llvm::MachineInstrBuilder::addRegMask(), and llvm::FastISel::selectPatchpoint().

◆ CreateShuffleMask()

static MachineOperand llvm::MachineOperand::CreateShuffleMask ( ArrayRef< int Mask)
inlinestatic

◆ CreateTargetIndex()

static MachineOperand llvm::MachineOperand::CreateTargetIndex ( unsigned  Idx,
int64_t  Offset,
unsigned  TargetFlags = 0 
)
inlinestatic

Definition at line 833 of file MachineOperand.h.

References MO_TargetIndex, and Offset.

Referenced by llvm::MachineInstrBuilder::addTargetIndex().

◆ dump()

LLVM_DUMP_METHOD void MachineOperand::dump ( ) const

Definition at line 961 of file MachineOperand.cpp.

References llvm::dbgs().

Referenced by rescheduleCanonically().

◆ getBlockAddress()

const BlockAddress* llvm::MachineOperand::getBlockAddress ( ) const
inline

◆ getCFIIndex()

unsigned llvm::MachineOperand::getCFIIndex ( ) const
inline

Definition at line 575 of file MachineOperand.h.

References assert(), and isCFIIndex().

Referenced by llvm::hash_value(), isIdenticalTo(), print(), and llvm::stableHashValue().

◆ getCImm()

const ConstantInt* llvm::MachineOperand::getCImm ( ) const
inline

◆ getFPImm()

const ConstantFP* llvm::MachineOperand::getFPImm ( ) const
inline

◆ getGlobal()

const GlobalValue* llvm::MachineOperand::getGlobal ( ) const
inline

◆ getImm()

int64_t llvm::MachineOperand::getImm ( ) const
inline

Definition at line 534 of file MachineOperand.h.

References assert(), and isImm().

Referenced by addConstantComments(), llvm::MachineInstrBuilder::addDisp(), llvm::R600InstrInfo::addFlag(), llvm::SITargetLowering::AddIMGInit(), llvm::GISelInstProfileBuilder::addNodeIDMachineOperand(), llvm::MachineInstr::addPseudoProbeAttribute(), llvm::HexagonInstrInfo::areMemAccessesTriviallyDisjoint(), llvm::R600InstrInfo::buildSlotOfVectorInstruction(), canCompareBeNewValueJump(), canFoldIntoCSel(), llvm::R600InstrInfo::clearFlag(), llvm::PPCInstrInfo::combineRLWINM(), compareMachineOp(), llvm::SIInstrInfo::convertToThreeAddress(), createPHIsForSelects(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::ARCFrameLowering::eliminateCallFramePseudoInstr(), llvm::WebAssemblyRegisterInfo::eliminateFrameIndex(), llvm::M68kRegisterInfo::eliminateFrameIndex(), llvm::SIRegisterInfo::eliminateFrameIndex(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::InstructionSelector::executeMatchTable(), llvm::M68kInstrInfo::ExpandMOVEM(), ExpandMOVImmSExti8(), expandSHXDROT(), findCondCodeUsedByInstr(), llvm::MachineInstr::findInlineAsmFlagIdx(), llvm::MachineInstr::findTiedOperandIdx(), fixupCalleeSaveRestoreStackOffset(), fixupSEHOpcode(), llvm::SIInstrInfo::FoldImmediate(), foldImmediates(), llvm::AArch64InstrInfo::genAlternativeCodeSequence(), llvm::getAddressFromInstr(), llvm::X86InstrInfo::getAddrModeFromMemoryOp(), getArgumentPopSize(), llvm::HexagonInstrInfo::getBaseAndOffset(), llvm::HexagonInstrInfo::getBundleNoShuf(), llvm::PatchPointOpers::getCallingConv(), llvm::HexagonInstrInfo::getCompoundOpcode(), GetCondCode(), llvm::getConstantVRegValWithLookThrough(), llvm::TargetInstrInfo::getExtractSubregInputs(), llvm::ARMBaseRegisterInfo::getFrameIndexInstrOffset(), llvm::StatepointOpers::getGCPointerMap(), getHWReg(), llvm::PatchPointOpers::getID(), getImmedFromMO(), llvm::HexagonInstrInfo::getIncrementValue(), llvm::MachineInstr::getInlineAsmDialect(), llvm::TargetInstrInfo::getInsertSubregInputs(), llvm::ARMBaseInstrInfo::getInsertSubregLikeInputs(), getLoadStoreOffsetSizeInBits(), llvm::SIInstrInfo::getMemOperandsWithOffsetWidth(), llvm::X86InstrInfo::getMemOperandsWithOffsetWidth(), llvm::LanaiInstrInfo::getMemOperandWithOffsetWidth(), llvm::RISCVInstrInfo::getMemOperandWithOffsetWidth(), llvm::AArch64InstrInfo::getMemOperandWithOffsetWidth(), llvm::PPCInstrInfo::getMemOperandWithOffsetWidth(), llvm::PatchPointOpers::getNumPatchBytes(), llvm::MachineInstr::getPseudoProbeAttribute(), llvm::MachineInstr::getRegClassConstraint(), llvm::TargetInstrInfo::getRegSequenceInputs(), llvm::R600InstrInfo::getSrcs(), getStoreOffset(), llvm::hash_value(), llvm::SIInstrInfo::hasModifiersSet(), llvm::MachineInstr::hasUnmodeledSideEffects(), llvm::HexagonLowerToMC(), hoistAndMergeSGPRInits(), if(), INITIALIZE_PASS(), llvm::SystemZFrameLowering::inlineStackProbe(), llvm::isAArch64FrameOffsetLegal(), llvm::PPCInstrInfo::isADDIInstrEligibleForFolding(), llvm::MipsInstrInfo::isAddImmediate(), llvm::HexagonInstrInfo::isConstExtended(), llvm::MachineInstr::isConvergent(), isIdenticalTo(), isIdentityValue(), llvm::PPCInstrInfo::isImmInstrEligibleForFolding(), llvm::SIInstrInfo::isInlineConstant(), isKImmOperand(), isKImmOrKUImmOperand(), isKUImmOperand(), isLdOffsetInRangeOfSt(), llvm::HexagonInstrInfo::isLoadFromStackSlot(), isLoadStoreThatCanHandleDisplacement(), isRedundantFlagInstr(), isRelevantAddressingMode(), isReverseInlineImm(), isSafeToFoldImmIntoCopy(), llvm::isScale(), llvm::MachineInstr::isStackAligningInlineAsm(), llvm::HexagonInstrInfo::isStoreToStackSlot(), llvm::SIInstrInfo::legalizeOperandsVOP2(), llvm::MSP430MCInstLower::Lower(), llvm::LanaiMCInstLower::Lower(), llvm::BPFMCInstLower::Lower(), llvm::WebAssemblyMCInstLower::lower(), llvm::XCoreMCInstLower::LowerOperand(), llvm::ARCMCInstLower::LowerOperand(), llvm::SystemZMCInstLower::lowerOperand(), llvm::AArch64MCInstLower::lowerOperand(), llvm::MipsMCInstLower::LowerOperand(), llvm::M68kMCInstLower::LowerOperand(), LowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), llvm::LowerRISCVMachineOperandToMCOperand(), llvm::MachineInstr::mayLoad(), llvm::MachineInstr::mayStore(), llvm::SIInstrInfo::moveToVALU(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::AArch64InstrInfo::optimizeCondBranch(), parseCondBranch(), performCustomAdjustments(), llvm::SystemZInstrInfo::prepareCompareSwapOperands(), print(), llvm::MachineInstr::print(), llvm::MipsAsmPrinter::PrintAsmMemoryOperand(), llvm::WebAssemblyAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::X86AsmPrinter::PrintAsmOperand(), llvm::AMDGPUAsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), llvm::AsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::printFCCOperand(), llvm::AVRAsmPrinter::printOperand(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), llvm::SIRegisterInfo::resolveFrameIndex(), llvm::R600InstrInfo::reverseBranchCondition(), llvm::rewriteT2FrameIndex(), llvm::HexagonInstrInfo::setBundleNoShuf(), llvm::AArch64InstrInfo::shouldClusterMemOps(), shrinkScalarLogicOp(), llvm::stableHashValue(), swapRegAndNonRegOperand(), llvm::SIInstrInfo::swapSourceModifiers(), tryConstantFoldOp(), tryToFoldACImm(), llvm::X86InstrInfo::unfoldMemoryOperand(), verifyInsExtInstruction(), llvm::RISCVInstrInfo::verifyInstruction(), and llvm::SIInstrInfo::verifyInstruction().

◆ getIndex()

int llvm::MachineOperand::getIndex ( ) const
inline

Definition at line 554 of file MachineOperand.h.

References assert(), isCPI(), isFI(), isJTI(), and isTargetIndex().

Referenced by llvm::MachineInstrBuilder::addDisp(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::ARCRegisterInfo::eliminateFrameIndex(), llvm::M68kRegisterInfo::eliminateFrameIndex(), llvm::ARMAsmPrinter::emitJumpTableAddrs(), llvm::ARMAsmPrinter::emitJumpTableInsts(), llvm::ARMAsmPrinter::emitJumpTableTBInst(), llvm::TargetLoweringBase::emitPatchPoint(), foldImmediates(), llvm::getAddressFromInstr(), llvm::MSP430MCInstLower::GetConstantPoolIndexSymbol(), llvm::LanaiMCInstLower::GetConstantPoolIndexSymbol(), llvm::SystemZMCInstLower::getExpr(), llvm::MSP430MCInstLower::GetJumpTableSymbol(), llvm::LanaiMCInstLower::GetJumpTableSymbol(), getMCSymbolForTOCPseudoMO(), getStartOrEndSlot(), getTargetIndexName(), llvm::hash_value(), hasSameBaseOpValue(), llvm::HexagonLowerToMC(), isIdenticalTo(), llvm::HexagonInstrInfo::isLoadFromStackSlot(), isSimilarDispOp(), llvm::HexagonInstrInfo::isStoreToStackSlot(), llvm::AArch64MCInstLower::lowerOperand(), LowerOperand(), llvm::M68kMCInstLower::LowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), llvm::LowerRISCVMachineOperandToMCOperand(), LowerSymbolOperand(), llvm::AArch64FrameLowering::orderFrameObjects(), print(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), llvm::ARMBaseInstrInfo::produceSameValue(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::AArch64InstrInfo::shouldClusterMemOps(), llvm::PPCInstrInfo::shouldClusterMemOps(), smallData(), llvm::stableHashValue(), and swapRegAndNonRegOperand().

◆ getIntrinsicID()

Intrinsic::ID llvm::MachineOperand::getIntrinsicID ( ) const
inline

◆ getMBB()

MachineBasicBlock* llvm::MachineOperand::getMBB ( ) const
inline

Definition at line 549 of file MachineOperand.h.

References assert(), and isMBB().

Referenced by addIncomingValuesToPHIs(), llvm::XCoreInstrInfo::analyzeBranch(), llvm::NVPTXInstrInfo::analyzeBranch(), llvm::VEInstrInfo::analyzeBranch(), llvm::SparcInstrInfo::analyzeBranch(), llvm::MipsInstrInfo::analyzeBranch(), llvm::HexagonInstrInfo::analyzeBranch(), llvm::R600InstrInfo::analyzeBranch(), llvm::AArch64InstrInfo::analyzeBranch(), llvm::PPCInstrInfo::analyzeBranch(), llvm::AArch64InstrInfo::analyzeBranchPredicate(), llvm::CombinerHelper::applyOptBrCondByInvertingCond(), BBIsJumpedOver(), llvm::HexagonEvaluator::evaluate(), findLoopComponents(), llvm::ARMBlockPlacement::fixBackwardsWLS(), llvm::HexagonInstrInfo::getDotNewPredJumpOp(), llvm::SystemZMCInstLower::getExpr(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::PHI_iterator::getIncomingBlock(), getInitPhiReg(), getLoopPhiReg(), llvm::PeelingModuloScheduleExpander::getPhiCanonicalReg(), getPHIPred(), getPhiRegs(), llvm::M68kMCInstLower::GetSymbolFromOperand(), getTargetMBB(), llvm::hash_value(), llvm::HexagonLowerToMC(), INITIALIZE_PASS(), insertPHI(), isIdenticalTo(), isSimilarDispOp(), llvm::LanaiMCInstLower::Lower(), llvm::MSP430MCInstLower::Lower(), llvm::BPFMCInstLower::Lower(), llvm::AArch64MCInstLower::lowerOperand(), LowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), llvm::LowerRISCVMachineOperandToMCOperand(), LowerSymbolOperand(), llvm::CombinerHelper::matchOptBrCondByInvertingCond(), parseCondBranch(), print(), llvm::WebAssemblyAsmPrinter::PrintAsmOperand(), llvm::AVRAsmPrinter::printOperand(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), llvm::MachineBasicBlock::replacePhiUsesWith(), splitBlock(), splitEdge(), splitMBB(), updatePHIs(), and verifyCFIntrinsic().

◆ getMCSymbol()

MCSymbol* llvm::MachineOperand::getMCSymbol ( ) const
inline

◆ getMetadata()

const MDNode* llvm::MachineOperand::getMetadata ( ) const
inline

Definition at line 643 of file MachineOperand.h.

References assert(), and isMetadata().

Referenced by llvm::hash_value(), isIdenticalTo(), print(), and llvm::MachineInstr::print().

◆ getOffset()

int64_t llvm::MachineOperand::getOffset ( ) const
inline

◆ getParent() [1/2]

MachineInstr* llvm::MachineOperand::getParent ( )
inline

◆ getParent() [2/2]

const MachineInstr* llvm::MachineOperand::getParent ( ) const
inline

Definition at line 236 of file MachineOperand.h.

◆ getPredicate()

unsigned llvm::MachineOperand::getPredicate ( ) const
inline

◆ getReg()

Register llvm::MachineOperand::getReg ( ) const
inline

getReg - Returns the register number.

Definition at line 357 of file MachineOperand.h.

References assert(), and isReg().

Referenced by addLiveInRegs(), llvm::GISelInstProfileBuilder::addNodeIDMachineOperand(), llvm::ScheduleDAGInstrs::addPhysRegDataDeps(), llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::MachineInstr::addRegisterDead(), llvm::MachineInstr::addRegisterDefined(), llvm::MachineInstr::addRegisterKilled(), llvm::MachineRegisterInfo::addRegOperandToUseList(), llvm::SrcOp::addSrcToMIB(), llvm::ScheduleDAGInstrs::addVRegDefDeps(), llvm::ScheduleDAGInstrs::addVRegUseDeps(), addVSetVL(), llvm::HexagonSubtarget::adjustSchedDependency(), allPhiOperandsUndefined(), llvm::AnalyzePhysRegInBundle(), llvm::AnalyzeVirtRegInBundle(), llvm::HexagonSubtarget::CallMutation::apply(), llvm::HexagonSubtarget::BankConflictMutation::apply(), applyAdjustICmpImmAndPred(), llvm::CombinerHelper::applyCombineDivRem(), llvm::CombinerHelper::applyCombineExtendingLoads(), llvm::CombinerHelper::applyCombineUnmergeZExtToZExt(), llvm::RegisterBankInfo::applyDefaultMapping(), llvm::CombinerHelper::applyExtendThroughPhis(), llvm::CombinerHelper::applyOptBrCondByInvertingCond(), llvm::CombinerHelper::applyShiftOfShiftedLogic(), llvm::HexagonInstrInfo::areMemAccessesTriviallyDisjoint(), attemptDebugCopyProp(), llvm::ARMBaseInstrInfo::breakPartialRegDependency(), llvm::SIInstrInfo::buildExtractSubReg(), llvm::BuildMI(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::R600InstrInfo::buildSlotOfVectorInstruction(), canCombine(), llvm::HexagonInstrInfo::canExecuteInBundle(), canFoldCopy(), canFoldIntoCSel(), canFoldIntoSelect(), llvm::HexagonPacketizerList::canPromoteToNewValueStore(), canRenameUpToDef(), llvm::SIInstrInfo::canShrink(), llvm::MachineInstr::changeDebugValuesDefReg(), llvm::X86InstrInfo::classifyLEAReg(), clearKillFlags(), llvm::MachineInstr::clearRegisterDeads(), llvm::MachineInstr::clearRegisterKills(), clobbersCTR(), llvm::ARMBaseInstrInfo::ClobbersPredicate(), llvm::HexagonInstrInfo::ClobbersPredicate(), llvm::PPCInstrInfo::ClobbersPredicate(), collectRegDefs(), CombineCVTAToLocal(), llvm::PPCInstrInfo::combineRLWINM(), compareMachineOp(), llvm::GISelKnownBits::computeKnownBitsImpl(), llvm::GISelKnownBits::computeNumSignBits(), llvm::TargetSchedModel::computeOutputLatency(), ConsecutiveInstr(), llvm::constrainOperandRegClass(), llvm::constrainSelectedInstRegOperands(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::SIInstrInfo::convertToThreeAddress(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::ScheduleDAGInstrs::deadDefHasNoUse(), llvm::ShapeT::deduceImm(), llvm::X86InstrInfo::describeLoadedValue(), llvm::WebAssemblyRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::SIRegisterInfo::eliminateFrameIndex(), emitIndirectDst(), emitIndirectSrc(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), emitLoadM0FromVGPRLoop(), emitLoadSRsrcFromVGPRLoop(), eraseGPOpnd(), llvm::InstructionSelector::executeMatchTable(), Expand2AddrUndef(), llvm::M68kInstrInfo::ExpandMOVEM(), llvm::M68kInstrInfo::ExpandMOVSZX_RM(), llvm::M68kInstrInfo::ExpandMOVSZX_RR(), llvm::M68kInstrInfo::ExpandMOVX_RR(), llvm::HexagonInstrInfo::expandPostRAPseudo(), llvm::M68kInstrInfo::ExpandPUSH_POP(), llvm::finalizeBundle(), llvm::PPCInstrInfo::finalizeInsInstrs(), llvm::X86RegisterInfo::findDeadCallerSavedReg(), findDeadCallerSavedReg(), findLoopComponents(), findNextInsertLocation(), llvm::MachineInstr::findRegisterDefOperandIdx(), llvm::MachineInstr::findRegisterUseOperandIdx(), findStartOfTree(), llvm::PPCInstrInfo::fixupIsDeadOrKill(), llvm::ScheduleDAGInstrs::fixupKills(), fixupPHIOpBanks(), llvm::SwingSchedulerDAG::fixupRegisterOverlaps(), llvm::PPCInstrInfo::foldFrameOffset(), llvm::ARMBaseInstrInfo::FoldImmediate(), llvm::SIInstrInfo::FoldImmediate(), foldImmediates(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::AArch64InstrInfo::foldMemoryOperandImpl(), llvm::X86InstrInfo::foldMemoryOperandImpl(), foldPatchpoint(), foldVGPRCopyIntoRegSequence(), for(), forceReg(), llvm::TargetInstrInfo::genAlternativeCodeSequence(), genFusedMultiply(), genMaddR(), llvm::getAddressFromInstr(), llvm::AArch64InstrInfo::getAddrModeFromMemoryOp(), llvm::X86InstrInfo::getAddrModeFromMemoryOp(), getBaseAddressRegister(), llvm::AMDGPU::getBaseWithConstantOffset(), getCallTargetRegOpnd(), llvm::HexagonInstrInfo::getCompoundOpcode(), llvm::SIRegisterInfo::getConstrainedRegClassForOperand(), getDataDeps(), llvm::AMDGPURegisterBankInfo::getDefaultMappingVOP(), getDefRegMask(), llvm::getDefSrcRegIgnoringCopies(), llvm::TargetInstrInfo::getExtractSubregInputs(), llvm::ARMBaseInstrInfo::getExtractSubregLikeInputs(), llvm::PPCInstrInfo::getFMAPatterns(), getFoldableImm(), getFPReg(), llvm::MachineInstrExpressionTrait::getHashValue(), llvm::ARMBankConflictHazardRecognizer::getHazardType(), llvm::HexagonHazardRecognizer::getHazardType(), getImmedFromMO(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::PHI_iterator::getIncomingValue(), getIndirectSGPRIdx(), getInitPhiReg(), llvm::TargetInstrInfo::getInsertSubregInputs(), llvm::ARMBaseInstrInfo::getInsertSubregLikeInputs(), llvm::ARMRegisterBankInfo::getInstrMapping(), llvm::RegisterBankInfo::getInstrMappingImpl(), llvm::ScheduleDAGInstrs::getLaneMaskForMO(), llvm::SrcOp::getLLTTy(), getLoopPhiReg(), llvm::SIInstrInfo::getMemOperandsWithOffsetWidth(), llvm::ReachingDefAnalysis::getMIOperand(), getMopState(), getNewSource(), llvm::HexagonInstrInfo::getOperandLatency(), llvm::PPCInstrInfo::getOperandLatency(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::ARMBaseInstrInfo::getPartialRegUpdateClearance(), llvm::X86InstrInfo::getPartialRegUpdateClearance(), llvm::PeelingModuloScheduleExpander::getPhiCanonicalReg(), getPHIDestReg(), getPhiRegs(), getPHISourceReg(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetPHIValue(), getRC32(), llvm::SrcOp::getReg(), llvm::SystemZRegisterInfo::getRegAllocationHints(), getRegSeqInit(), llvm::TargetInstrInfo::getRegSequenceInputs(), llvm::ARMBaseInstrInfo::getRegSequenceLikeInputs(), llvm::getRegState(), getShuffleComment(), llvm::R600InstrInfo::getSrcs(), llvm::X86InstrInfo::getUndefRegClearance(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetUndefVal(), getUsedRegMask(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), getVDefInterval(), llvm::getVRegSubRegDef(), handleADRP(), llvm::LiveIntervals::handleMoveIntoNewBundle(), llvm::hash_value(), hasInefficientLEABaseReg(), llvm::X86InstrInfo::hasLiveCondCodeDef(), hasLiveThroughUse(), hasRAWHazard(), llvm::TargetInstrInfo::hasReassociableOperands(), llvm::TargetInstrInfo::hasReassociableSibling(), hasRegisterDependency(), llvm::MachineInstr::hasRegisterImplicitUseOperand(), hasSameBaseOpValue(), llvm::HexagonLowerToMC(), indirectCopyToAGPR(), INITIALIZE_PASS(), llvm::HexagonInstrInfo::insertBranch(), insertDivByZeroTrap(), llvm::rdf::CopyPropagation::interpretAsCopy(), llvm::MipsInstrInfo::isAddImmediate(), llvm::AArch64InstrInfo::isAddImmediate(), llvm::ARMBaseInstrInfo::isAddImmediate(), llvm::InstructionSelector::isBaseWithConstantOffset(), llvm::WebAssembly::isChild(), llvm::AArch64GISelUtils::isCMN(), llvm::MachineInstr::isConstantValuePHI(), isCopyFromExec(), isCopyToExec(), llvm::IsCPSRDead< MachineInstr >(), isCrossCopy(), llvm::AArch64InstrInfo::isExtendLikelyToBeFolded(), isIdenticalOp(), isIdenticalTo(), llvm::MachineInstr::isIdenticalTo(), llvm::MachineInstr::isIdentityCopy(), llvm::PPCInstrInfo::isImmInstrEligibleForFolding(), isInvariantStore(), llvm::isKnownNeverNaN(), isLdStSafeToCluster(), llvm::SIInstrInfo::isLegalRegOperand(), llvm::HexagonPacketizerList::isLegalToPacketizeTogether(), isLogicalOpOnExec(), llvm::SMSchedule::isLoopCarriedDefOfUse(), llvm::SwingSchedulerDAG::isLoopCarriedDep(), isMMSourceRegister(), isMMThreeBitGPRegister(), isNonFoldablePartialRegisterLoad(), isNopCopy(), llvm::InstructionSelector::isOperandImmEqual(), isOperandKill(), llvm::SIInstrInfo::isOperandLegal(), isPromotableZeroStoreInst(), isRedundantFlagInstr(), isRegInClass(), isRelevantAddressingMode(), isRenamable(), IsSafeAndProfitableToMove(), isSameReg(), llvm::SIInstrInfo::isSGPRStackAccess(), llvm::SIInstrInfo::isStackAccess(), isSubRegOf(), llvm::HexagonInstrInfo::isToBeScheduledASAP(), isTwoAddrUse(), isValidRegDefOf(), isValidRegUseOf(), llvm::PPCInstrInfo::isValidToBeChangedReg(), isVirtualRegisterOperand(), IsWritingToVCCR(), llvm::SIInstrInfo::legalizeOperands(), llvm::SIInstrInfo::legalizeOperandsFLAT(), llvm::SIInstrInfo::legalizeOperandsSMRD(), llvm::SIInstrInfo::legalizeOperandsVOP2(), llvm::SIInstrInfo::legalizeOperandsVOP3(), llvm::Mips16InstrInfo::loadImmediate(), llvm::BPFMCInstLower::Lower(), llvm::LanaiMCInstLower::Lower(), llvm::MSP430MCInstLower::Lower(), llvm::WebAssemblyMCInstLower::lower(), llvm::XCoreMCInstLower::LowerOperand(), llvm::ARCMCInstLower::LowerOperand(), llvm::SystemZMCInstLower::lowerOperand(), llvm::AArch64MCInstLower::lowerOperand(), llvm::MipsMCInstLower::LowerOperand(), llvm::M68kMCInstLower::LowerOperand(), LowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), llvm::LowerRISCVMachineOperandToMCOperand(), llvm::MIPatternMatch::BinaryOp_match< LHS_P, RHS_P, Opcode, Commutable >::match(), llvm::MIPatternMatch::UnaryOp_match< SrcTy, Opcode >::match(), llvm::MIPatternMatch::CompareOp_match< Pred_P, LHS_P, RHS_P, Opcode >::match(), llvm::MIPatternMatch::TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, Opcode >::match(), llvm::CombinerHelper::matchCombineExtOfExt(), llvm::CombinerHelper::matchCombineInsertVecElts(), llvm::CombinerHelper::matchCombineTruncOfExt(), llvm::CombinerHelper::matchCombineUnmergeMergeToPlainValues(), llvm::CombinerHelper::matchConstantOp(), llvm::CombinerHelper::matchEqualDefs(), llvm::CombinerHelper::matchExtractVecEltBuildVec(), matchExtractVecEltPairwiseAdd(), llvm::CombinerHelper::matchHoistLogicOpWithSameOpcodeHands(), llvm::CombinerHelper::matchLoadOrCombine(), llvm::CombinerHelper::matchOperandIsKnownToBeAPowerOfTwo(), llvm::CombinerHelper::matchOperandIsUndef(), llvm::CombinerHelper::matchPtrAddImmedChain(), llvm::CombinerHelper::matchSextInRegOfLoad(), llvm::CombinerHelper::matchShiftImmedChain(), llvm::CombinerHelper::matchShiftOfShiftedLogic(), matchSwap(), MIIsInTerminatorSequence(), llvm::LegalizerHelper::moreElementsVectorDst(), llvm::LegalizerHelper::moreElementsVectorSrc(), llvm::MachineRegisterInfo::moveOperands(), llvm::PeelingModuloScheduleExpander::moveStageBetweenBlocks(), llvm::SIInstrInfo::moveToVALU(), MoveVPNOTBeforeFirstUser(), oneUseDominatesOtherUses(), llvm::ShapeT::operator==(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::AArch64InstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::AArch64InstrInfo::optimizeCondBranch(), llvm::X86InstrInfo::optimizeLoadInstr(), llvm::LanaiInstrInfo::optimizeSelect(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::SMSchedule::orderDependence(), llvm::CallLowering::parametersInCSRMatch(), parseOperands(), llvm::PeelSingleBlockLoop(), print(), llvm::ARMAsmPrinter::PrintAsmMemoryOperand(), llvm::MipsAsmPrinter::PrintAsmMemoryOperand(), printAsmMRegister(), llvm::AVRAsmPrinter::PrintAsmOperand(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::AMDGPUAsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), printAsmVRegister(), llvm::AVRAsmPrinter::printOperand(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), llvm::ARMBaseInstrInfo::produceSameValue(), producesFalseLanesZero(), llvm::MachineInstr::readsWritesVirtualRegister(), llvm::TargetInstrInfo::reassociateOps(), llvm::WebAssemblyAsmPrinter::regToString(), reinsertVectorIndexAdd(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::X86InstrInfo::reMaterialize(), removeCopies(), RemoveDeadAddBetweenLEAAndJT(), llvm::MachineRegisterInfo::removeRegOperandFromUseList(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), llvm::PPCFrameLowering::replaceFPWithRealFP(), rescheduleCanonically(), llvm::R600InstrInfo::reverseBranchCondition(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::R600SchedStrategy::schedNode(), setIsRenamable(), setM0ToIndexFromSGPR(), llvm::MachineInstr::setPhysRegsDeadExcept(), setReg(), llvm::MachineInstr::setRegisterDefReadUndef(), llvm::AArch64InstrInfo::shouldClusterMemOps(), llvm::PPCInstrInfo::shouldClusterMemOps(), shrinkScalarLogicOp(), SinkingPreventsImplicitNullCheck(), llvm::MachineBasicBlock::SplitCriticalEdge(), splitMBB(), llvm::stableHashValue(), llvm::MachineInstr::substituteRegister(), swapRegAndNonRegOperand(), tryAddToFoldList(), llvm::LegalizationArtifactCombiner::tryCombineExtract(), llvm::LegalizationArtifactCombiner::tryCombineUnmergeValues(), llvm::tryFoldSPUpdateIntoPushPop(), llvm::LegalizationArtifactCombiner::tryFoldUnmergeCast(), tryToFindRegisterToRename(), tryToFoldACImm(), llvm::X86InstrInfo::unfoldMemoryOperand(), UpdateCPSRDef(), UpdateCPSRUse(), llvm::HexagonPacketizerList::updateOffset(), updateOperand(), UpdateOperandRegClass(), updateOperandRegConstraints(), updatePhysDepsDownwards(), updatePhysDepsUpwards(), UseReg(), llvm::SIInstrInfo::usesConstantBus(), llvm::RegisterBankInfo::InstructionMapping::verify(), verifyCFIntrinsic(), llvm::SIInstrInfo::verifyInstruction(), VerifyLowRegs(), llvm::MachineRegisterInfo::verifyUseList(), and llvm::WebAssemblyDebugValueManager::WebAssemblyDebugValueManager().

◆ getRegLiveOut()

const uint32_t* llvm::MachineOperand::getRegLiveOut ( ) const
inline

getRegLiveOut - Returns a bit mask of live-out registers.

Definition at line 638 of file MachineOperand.h.

References assert(), and isRegLiveOut().

Referenced by print().

◆ getRegMask()

const uint32_t* llvm::MachineOperand::getRegMask ( ) const
inline

getRegMask - Returns a bit mask of registers preserved by this RegMask operand.

Definition at line 627 of file MachineOperand.h.

References assert(), and isRegMask().

Referenced by clobbersPhysReg(), llvm::hash_value(), isIdenticalTo(), print(), and llvm::stableHashValue().

◆ getRegMaskSize()

static unsigned llvm::MachineOperand::getRegMaskSize ( unsigned  NumRegs)
inlinestatic

Returns number of elements needed for a regmask array.

Definition at line 633 of file MachineOperand.h.

Referenced by llvm::MachineFunction::allocateRegMask(), and llvm::AArch64RegisterInfo::UpdateCustomCallPreservedMask().

◆ getShuffleMask()

ArrayRef<int> llvm::MachineOperand::getShuffleMask ( ) const
inline

◆ getSubReg()

unsigned llvm::MachineOperand::getSubReg ( ) const
inline

Definition at line 362 of file MachineOperand.h.

References assert(), and isReg().

Referenced by llvm::MachineInstr::addRegisterDefined(), llvm::ScheduleDAGInstrs::addVRegDefDeps(), llvm::HexagonInstrInfo::areMemAccessesTriviallyDisjoint(), attemptDebugCopyProp(), llvm::SIInstrInfo::buildExtractSubReg(), canFoldCopy(), llvm::GISelKnownBits::computeKnownBitsImpl(), llvm::GISelKnownBits::computeNumSignBits(), emitLoadM0FromVGPRLoop(), llvm::HexagonInstrInfo::expandPostRAPseudo(), findUseBetween(), llvm::SIInstrInfo::FoldImmediate(), llvm::AArch64InstrInfo::foldMemoryOperandImpl(), llvm::X86InstrInfo::foldMemoryOperandImpl(), foldPatchpoint(), foldVGPRCopyIntoRegSequence(), llvm::HexagonInstrInfo::getBaseAndOffset(), getDefRegMask(), llvm::TargetInstrInfo::getExtractSubregInputs(), llvm::ARMBaseInstrInfo::getExtractSubregLikeInputs(), llvm::TargetInstrInfo::getInsertSubregInputs(), llvm::ARMBaseInstrInfo::getInsertSubregLikeInputs(), llvm::ScheduleDAGInstrs::getLaneMaskForMO(), getNewSource(), llvm::SIInstrInfo::getOpSize(), llvm::ARMBaseInstrInfo::getPartialRegUpdateClearance(), getRC32(), llvm::SystemZRegisterInfo::getRegAllocationHints(), llvm::MachineInstr::getRegClassConstraintEffect(), getRegSeqInit(), llvm::TargetInstrInfo::getRegSequenceInputs(), llvm::ARMBaseInstrInfo::getRegSequenceLikeInputs(), getUsedRegMask(), llvm::hash_value(), INITIALIZE_PASS(), llvm::rdf::CopyPropagation::interpretAsCopy(), isCrossCopy(), llvm::MachineInstr::isFullCopy(), isIdenticalTo(), llvm::MachineInstr::isIdentityCopy(), llvm::SIInstrInfo::isLegalRegOperand(), llvm::SIInstrInfo::isOperandLegal(), isSameReg(), isSSA(), llvm::SIInstrInfo::legalizeOperandsVOP2(), llvm::ARMAsmPrinter::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), matchSwap(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeLoadInstr(), print(), llvm::ARMAsmPrinter::printOperand(), readsReg(), llvm::MachineInstr::readsWritesVirtualRegister(), llvm::MachineInstr::setRegisterDefReadUndef(), llvm::TailDuplicator::shouldTailDuplicate(), llvm::stableHashValue(), substPhysReg(), substVirtReg(), swapRegAndNonRegOperand(), tryToFoldACImm(), and llvm::SIInstrInfo::verifyInstruction().

◆ getSymbolName()

const char* llvm::MachineOperand::getSymbolName ( ) const
inline

◆ getTargetFlags()

unsigned llvm::MachineOperand::getTargetFlags ( ) const
inline

◆ getTargetIndexName()

const char * MachineOperand::getTargetIndexName ( ) const

getTargetIndexName - If this MachineOperand is a TargetIndex that has a name, attempt to get the name.

Returns nullptr if the TargetIndex does not have a name. Asserts if MO is not a TargetIndex.

Definition at line 423 of file MachineOperand.cpp.

References getIndex(), and getMFIfAvailable().

Referenced by print(), and llvm::stableHashValue().

◆ getType()

MachineOperandType llvm::MachineOperand::getType ( ) const
inline

◆ isBlockAddress()

bool llvm::MachineOperand::isBlockAddress ( ) const
inline

isBlockAddress - Tests if this is a MO_BlockAddress operand.

Definition at line 340 of file MachineOperand.h.

References MO_BlockAddress.

Referenced by getBlockAddress(), getOffset(), llvm::HexagonInstrInfo::isConstExtended(), isSimilarDispOp(), isValidDispOp(), and setOffset().

◆ isCFIIndex()

bool llvm::MachineOperand::isCFIIndex ( ) const
inline

Definition at line 348 of file MachineOperand.h.

References MO_CFIIndex.

Referenced by getCFIIndex().

◆ isCImm()

bool llvm::MachineOperand::isCImm ( ) const
inline

◆ isCPI()

bool llvm::MachineOperand::isCPI ( ) const
inline

isCPI - Tests if this is a MO_ConstantPoolIndex operand.

Definition at line 330 of file MachineOperand.h.

References MO_ConstantPoolIndex.

Referenced by canFoldIntoSelect(), getIndex(), getOffset(), isAnImmediateOperand(), llvm::HexagonInstrInfo::isConstExtended(), isSimilarDispOp(), isValidDispOp(), setIndex(), setOffset(), and smallData().

◆ isDead()

bool llvm::MachineOperand::isDead ( ) const
inline

◆ isDebug()

bool llvm::MachineOperand::isDebug ( ) const
inline

◆ isDef()

bool llvm::MachineOperand::isDef ( ) const
inline

Definition at line 372 of file MachineOperand.h.

References assert(), and isReg().

Referenced by addLiveInRegs(), llvm::GISelInstProfileBuilder::addNodeIDMachineOperand(), llvm::ScheduleDAGInstrs::addPhysRegDataDeps(), llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::MachineInstr::addRegisterDead(), llvm::MachineInstr::addRegisterDefined(), llvm::MachineRegisterInfo::addRegOperandToUseList(), llvm::ScheduleDAGInstrs::addVRegDefDeps(), llvm::AnalyzePhysRegInBundle(), llvm::AnalyzeVirtRegInBundle(), llvm::HexagonSubtarget::CallMutation::apply(), llvm::ScheduleDAGInstrs::buildSchedGraph(), canFoldIntoSelect(), canRenameUpToDef(), ChangeToRegister(), llvm::MachineInstr::clearRegisterDeads(), clobbersCTR(), llvm::ARMBaseInstrInfo::ClobbersPredicate(), llvm::HexagonInstrInfo::ClobbersPredicate(), llvm::PPCInstrInfo::ClobbersPredicate(), collectRegDefs(), llvm::constrainOperandRegClass(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), CreateReg(), llvm::finalizeBundle(), llvm::X86RegisterInfo::findDeadCallerSavedReg(), findDeadCallerSavedReg(), findDefIdx(), llvm::MachineInstr::findRegisterDefOperandIdx(), findUseIdx(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::X86InstrInfo::foldMemoryOperandImpl(), getDefRegMask(), llvm::MachineInstrExpressionTrait::getHashValue(), llvm::PPCInstrInfo::getInstrLatency(), llvm::PatchPointOpers::getNextScratchIdx(), llvm::MachineInstr::getNumExplicitDefs(), llvm::getRegState(), getVDefInterval(), llvm::hash_value(), llvm::MachineInstr::hasImplicitDef(), llvm::X86InstrInfo::hasLiveCondCodeDef(), hasRegisterDependency(), INITIALIZE_PASS(), llvm::WebAssembly::isChild(), isIdenticalTo(), llvm::MachineInstr::isIdenticalTo(), llvm::SMSchedule::isLoopCarriedDefOfUse(), llvm::MachineInstr::isRegTiedToUseOperand(), isRenamable(), IsSafeAndProfitableToMove(), isValidRegDef(), llvm::Mips16InstrInfo::loadImmediate(), MIIsInTerminatorSequence(), llvm::SIInstrInfo::moveToVALU(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeLoadInstr(), llvm::SMSchedule::orderDependence(), parseOperands(), print(), llvm::MachineInstr::print(), printImplicitRegisterFlag(), RemoveDeadAddBetweenLEAAndJT(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), rescheduleCanonically(), llvm::MachineInstr::setPhysRegsDeadExcept(), llvm::MachineInstr::setRegisterDefReadUndef(), llvm::stableHashValue(), substPhysReg(), llvm::MachineInstr::tieOperands(), UpdateCPSRUse(), updateOperand(), updatePhysDepsDownwards(), and updatePhysDepsUpwards().

◆ isEarlyClobber()

bool llvm::MachineOperand::isEarlyClobber ( ) const
inline

◆ isFI()

bool llvm::MachineOperand::isFI ( ) const
inline

◆ isFPImm()

bool llvm::MachineOperand::isFPImm ( ) const
inline

◆ isGlobal()

bool llvm::MachineOperand::isGlobal ( ) const
inline

◆ isIdenticalTo()

bool MachineOperand::isIdenticalTo ( const MachineOperand Other) const

Returns true if this operand is identical to the specified operand except for liveness related flags (isKill, isUndef and isDead).

isIdenticalTo - Return true if this operand is identical to the specified operand.

Note that this should stay in sync with the hash_value overload below.

Definition at line 282 of file MachineOperand.cpp.

References llvm::lltok::equal, getBlockAddress(), getCFIIndex(), getCImm(), getFPImm(), getGlobal(), getImm(), getIndex(), getIntrinsicID(), getMBB(), getMCSymbol(), getMetadata(), getMFIfAvailable(), llvm::MCRegisterInfo::getNumRegs(), getOffset(), getPredicate(), getReg(), getRegMask(), getShuffleMask(), getSubReg(), getSymbolName(), getTargetFlags(), getType(), isDef(), llvm_unreachable, MO_BlockAddress, MO_CFIIndex, MO_CImmediate, MO_ConstantPoolIndex, MO_ExternalSymbol, MO_FPImmediate, MO_FrameIndex, MO_GlobalAddress, MO_Immediate, MO_IntrinsicID, MO_JumpTableIndex, MO_MachineBasicBlock, MO_MCSymbol, MO_Metadata, MO_Predicate, MO_Register, MO_RegisterLiveOut, MO_RegisterMask, MO_ShuffleMask, MO_TargetIndex, Other, and TRI.

Referenced by llvm::X86InstrInfo::analyzeBranchPredicate(), llvm::LanaiInstrInfo::areMemAccessesTriviallyDisjoint(), llvm::AArch64InstrInfo::areMemAccessesTriviallyDisjoint(), llvm::RISCVInstrInfo::areMemAccessesTriviallyDisjoint(), llvm::PPCInstrInfo::areMemAccessesTriviallyDisjoint(), llvm::DenseMapInfo< MachineOperand >::isEqual(), isIdenticalOp(), llvm::MachineInstr::isIdenticalTo(), isImplicitOperandIn(), llvm::SwingSchedulerDAG::isLoopCarriedDep(), IsVPNOTEquivalent(), memOpsHaveSameBasePtr(), llvm::ARMBaseInstrInfo::produceSameValue(), and llvm::AArch64InstrInfo::shouldClusterMemOps().

◆ isImm()

bool llvm::MachineOperand::isImm ( ) const
inline

isImm - Tests if this is a MO_Immediate operand.

Definition at line 320 of file MachineOperand.h.

References MO_Immediate.

Referenced by addConstantComments(), llvm::GISelInstProfileBuilder::addNodeIDMachineOperand(), llvm::HexagonInstrInfo::analyzeCompare(), areCombinableOperations(), llvm::HexagonInstrInfo::areMemAccessesTriviallyDisjoint(), llvm::R600InstrInfo::buildSlotOfVectorInstruction(), canCompareBeNewValueJump(), canFoldIntoCSel(), llvm::PPCInstrInfo::combineRLWINM(), llvm::SIInstrInfo::convertToThreeAddress(), llvm::WebAssemblyRegisterInfo::eliminateFrameIndex(), llvm::PPCFrameLowering::emitEpilogue(), llvm::InstructionSelector::executeMatchTable(), llvm::MachineInstr::findInlineAsmFlagIdx(), llvm::MachineInstr::findTiedOperandIdx(), llvm::SIInstrInfo::FoldImmediate(), foldImmediates(), llvm::AArch64InstrInfo::genAlternativeCodeSequence(), llvm::X86InstrInfo::getAddrModeFromMemoryOp(), llvm::HexagonInstrInfo::getBaseAndOffset(), llvm::HexagonInstrInfo::getBundleNoShuf(), llvm::HexagonInstrInfo::getCompoundOpcode(), llvm::getConstantVRegValWithLookThrough(), llvm::TargetInstrInfo::getExtractSubregInputs(), llvm::R600InstrInfo::getFlagOp(), getImm(), getImmedFromMO(), getImmOrMaterializedImm(), llvm::HexagonInstrInfo::getIncrementValue(), llvm::TargetInstrInfo::getInsertSubregInputs(), llvm::AArch64InstrInfo::getMemOpBaseRegImmOfsOffsetOperand(), llvm::X86InstrInfo::getMemOperandsWithOffsetWidth(), llvm::LanaiInstrInfo::getMemOperandWithOffsetWidth(), llvm::RISCVInstrInfo::getMemOperandWithOffsetWidth(), llvm::AArch64InstrInfo::getMemOperandWithOffsetWidth(), llvm::PPCInstrInfo::getMemOperandWithOffsetWidth(), llvm::TargetInstrInfo::getRegSequenceInputs(), llvm::R600InstrInfo::getSrcs(), getStoreOffset(), llvm::HexagonInstrInfo::immediateExtend(), indirectCopyToAGPR(), INITIALIZE_PASS(), llvm::PPCInstrInfo::isADDIInstrEligibleForFolding(), llvm::MipsInstrInfo::isAddImmediate(), isAnImmediateOperand(), llvm::HexagonInstrInfo::isConstExtended(), llvm::MachineInstr::isDebugOffsetImm(), isIdentityValue(), llvm::PPCInstrInfo::isImmInstrEligibleForFolding(), llvm::SIInstrInfo::isImmOperandLegal(), llvm::SIInstrInfo::isInlineConstant(), isInvariantStore(), llvm::SIInstrInfo::isLegalVSrcOperand(), llvm::SIInstrInfo::isLiteralConstant(), llvm::HexagonInstrInfo::isLoadFromStackSlot(), isLoadStoreThatCanHandleDisplacement(), llvm::SIInstrInfo::isOperandLegal(), isRelevantAddressingMode(), isSafeToFoldImmIntoCopy(), llvm::isScale(), isSimilarDispOp(), llvm::HexagonInstrInfo::isStoreToStackSlot(), isValidDispOp(), llvm::SIInstrInfo::legalizeOperandsVOP2(), llvm::SIInstrInfo::moveToVALU(), llvm::TargetInstrInfo::PredicateInstruction(), llvm::MachineInstr::print(), llvm::MipsAsmPrinter::PrintAsmMemoryOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::X86AsmPrinter::PrintAsmOperand(), llvm::AMDGPUAsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), llvm::AsmPrinter::PrintAsmOperand(), llvm::recomputeVPTBlockMask(), llvm::SIRegisterInfo::resolveFrameIndex(), llvm::HexagonInstrInfo::setBundleNoShuf(), setImm(), shrinkScalarCompare(), shrinkScalarLogicOp(), swapRegAndNonRegOperand(), tryAddToFoldList(), tryConstantFoldOp(), tryToFoldACImm(), llvm::SIInstrInfo::usesConstantBus(), verifyInsExtInstruction(), llvm::RISCVInstrInfo::verifyInstruction(), and llvm::SIInstrInfo::verifyInstruction().

◆ isImplicit()

bool llvm::MachineOperand::isImplicit ( ) const
inline

◆ isInternalRead()

bool llvm::MachineOperand::isInternalRead ( ) const
inline

Definition at line 428 of file MachineOperand.h.

References assert(), and isReg().

Referenced by CreateReg(), llvm::getRegState(), INITIALIZE_PASS(), print(), and readsReg().

◆ isIntrinsicID()

bool llvm::MachineOperand::isIntrinsicID ( ) const
inline

◆ isJTI()

bool llvm::MachineOperand::isJTI ( ) const
inline

◆ isKill()

bool llvm::MachineOperand::isKill ( ) const
inline

◆ isMBB()

bool llvm::MachineOperand::isMBB ( ) const
inline

◆ isMCSymbol()

bool llvm::MachineOperand::isMCSymbol ( ) const
inline

◆ isMetadata()

bool llvm::MachineOperand::isMetadata ( ) const
inline

isMetadata - Tests if this is a MO_Metadata operand.

Definition at line 346 of file MachineOperand.h.

References MO_Metadata.

Referenced by getMetadata(), llvm::MachineInstr::print(), and setMetadata().

◆ isPredicate()

bool llvm::MachineOperand::isPredicate ( ) const
inline

◆ isReg()

bool llvm::MachineOperand::isReg ( ) const
inline

isReg - Tests if this is a MO_Register operand.

Definition at line 318 of file MachineOperand.h.

References MO_Register.

Referenced by addLiveInRegs(), llvm::GISelInstProfileBuilder::addNodeIDMachineOperand(), llvm::MachineInstr::addOperand(), llvm::MachineInstr::addRegisterDead(), llvm::MachineInstr::addRegisterDefined(), llvm::MachineInstr::addRegisterKilled(), addTargetFlag(), llvm::ScheduleDAGInstrs::addVRegDefDeps(), llvm::HexagonSubtarget::adjustSchedDependency(), llvm::MachineInstr::allDefsAreDead(), llvm::AnalyzePhysRegInBundle(), llvm::AnalyzeVirtRegInBundle(), llvm::HexagonSubtarget::CallMutation::apply(), llvm::HexagonSubtarget::BankConflictMutation::apply(), llvm::RegisterBankInfo::applyDefaultMapping(), llvm::BuildMI(), llvm::ScheduleDAGInstrs::buildSchedGraph(), canCombine(), llvm::HexagonInstrInfo::canExecuteInBundle(), canFoldIntoSelect(), llvm::HexagonPacketizerList::canPromoteToNewValueStore(), canRenameUpToDef(), llvm::SIInstrInfo::canShrink(), ChangeToES(), ChangeToFPImmediate(), ChangeToFrameIndex(), ChangeToGA(), ChangeToImmediate(), ChangeToMCSymbol(), ChangeToRegister(), ChangeToTargetIndex(), checkRegOnlyPHIInputs(), llvm::MachineInstr::clearKillInfo(), llvm::MachineInstr::clearRegisterDeads(), llvm::MachineInstr::clearRegisterKills(), clobbersCTR(), llvm::ARMBaseInstrInfo::ClobbersPredicate(), llvm::HexagonInstrInfo::ClobbersPredicate(), llvm::PPCInstrInfo::ClobbersPredicate(), collectRegDefs(), llvm::SIInstrInfo::commuteInstructionImpl(), llvm::constrainSelectedInstRegOperands(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::SIInstrInfo::convertToThreeAddress(), copyExtraImplicitOps(), llvm::MachineInstr::copyImplicitOps(), copyRegOperand(), llvm::X86InstrInfo::describeLoadedValue(), llvm::WebAssemblyRegisterInfo::eliminateFrameIndex(), emitIndirectDst(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::TargetLoweringBase::emitPatchPoint(), eraseGPOpnd(), llvm::InstructionSelector::executeMatchTable(), llvm::finalizeBundle(), llvm::X86RegisterInfo::findDeadCallerSavedReg(), findDeadCallerSavedReg(), findDefIdx(), findNextInsertLocation(), llvm::MachineInstr::findRegisterDefOperandIdx(), llvm::MachineInstr::findRegisterUseOperandIdx(), llvm::MachineInstr::findTiedOperandIdx(), findUseIdx(), llvm::PPCInstrInfo::fixupIsDeadOrKill(), llvm::ScheduleDAGInstrs::fixupKills(), fixupPHIOpBanks(), llvm::SwingSchedulerDAG::fixupRegisterOverlaps(), llvm::SIInstrInfo::FoldImmediate(), foldImmediates(), for(), forceReg(), FuseInst(), llvm::getAddressFromInstr(), llvm::AArch64InstrInfo::getAddrModeFromMemoryOp(), getBaseAddressRegister(), getCallTargetRegOpnd(), getDataDeps(), llvm::AMDGPURegisterBankInfo::getDefaultMappingVOP(), getDefRegMask(), getFMAPatterns(), getFoldableImm(), getFPReg(), llvm::MachineInstrExpressionTrait::getHashValue(), llvm::HexagonHazardRecognizer::getHazardType(), getImmedFromMO(), llvm::PPCInstrInfo::getInstrLatency(), llvm::ARMRegisterBankInfo::getInstrMapping(), llvm::RegisterBankInfo::getInstrMappingImpl(), getMaddPatterns(), llvm::SIInstrInfo::getMemOperandsWithOffsetWidth(), llvm::HexagonInstrInfo::getMemOperandsWithOffsetWidth(), llvm::X86InstrInfo::getMemOperandsWithOffsetWidth(), llvm::LanaiInstrInfo::getMemOperandWithOffsetWidth(), llvm::RISCVInstrInfo::getMemOperandWithOffsetWidth(), llvm::AArch64InstrInfo::getMemOperandWithOffsetWidth(), llvm::PPCInstrInfo::getMemOperandWithOffsetWidth(), llvm::ReachingDefAnalysis::getMIOperand(), llvm::PatchPointOpers::getNextScratchIdx(), llvm::MachineInstr::getNumExplicitDefs(), llvm::MachineInstr::getNumExplicitOperands(), llvm::HexagonInstrInfo::getOperandLatency(), llvm::SIInstrInfo::getOpSize(), getPostIncrementOperand(), getReg(), llvm::MachineInstr::getRegClassConstraintEffect(), getRegOrUndef(), getRegSeqInit(), llvm::getRegState(), getShuffleComment(), getSubReg(), getTargetFlags(), getUsedRegMask(), getVDefInterval(), llvm::getVRegSubRegDef(), llvm::LiveIntervals::handleMoveIntoNewBundle(), hasInefficientLEABaseReg(), llvm::X86InstrInfo::hasLiveCondCodeDef(), hasLiveThroughUse(), llvm::TargetInstrInfo::hasReassociableOperands(), hasRegisterDependency(), llvm::MachineInstr::hasRegisterImplicitUseOperand(), hasSameBaseOpValue(), indirectCopyToAGPR(), INITIALIZE_PASS(), llvm::MipsInstrInfo::isAddImmediate(), llvm::AArch64InstrInfo::isAddImmediate(), llvm::ARMBaseInstrInfo::isAddImmediate(), llvm::InstructionSelector::isBaseWithConstantOffset(), llvm::WebAssembly::isChild(), isCopyFromExec(), isCopyToExec(), llvm::IsCPSRDead< MachineInstr >(), isDead(), isDebug(), isDef(), isEarlyClobber(), isIdenticalOp(), llvm::MachineInstr::isIdenticalTo(), llvm::PPCInstrInfo::isImmInstrEligibleForFolding(), isImplicit(), llvm::MachineInstr::isIndirectDebugValue(), isInternalRead(), isInvariantStore(), isKill(), isLdStSafeToCluster(), llvm::SIInstrInfo::isLegalRegOperand(), llvm::HexagonPacketizerList::isLegalToPacketizeTogether(), llvm::SIInstrInfo::isLegalVSrcOperand(), isLogicalOpOnExec(), llvm::SMSchedule::isLoopCarriedDefOfUse(), isMMSourceRegister(), isMMThreeBitGPRegister(), llvm::InstructionSelector::isOperandImmEqual(), llvm::SIInstrInfo::isOperandLegal(), llvm::M68kInstrInfo::isPCRelRegisterOperandLegal(), isRedundantFlagInstr(), isRegInClass(), llvm::MachineInstr::isRegTiedToDefOperand(), llvm::MachineInstr::isRegTiedToUseOperand(), isRelevantAddressingMode(), isRenamable(), IsSafeAndProfitableToMove(), isSameReg(), isTied(), llvm::HexagonInstrInfo::isToBeScheduledASAP(), isTwoAddrUse(), isUndef(), isUse(), isVirtualRegisterOperand(), IsWritingToVCCR(), llvm::SIInstrInfo::legalizeOperands(), llvm::SIInstrInfo::legalizeOperandsVOP2(), llvm::SIInstrInfo::legalizeOperandsVOP3(), llvm::SIInstrInfo::legalizeOpWithMove(), llvm::Mips16InstrInfo::loadImmediate(), llvm::SystemZMCInstLower::lower(), llvm::WebAssemblyMCInstLower::lower(), LowerCallResults(), llvm::MIPatternMatch::operand_type_match::match(), llvm::CombinerHelper::matchConstantOp(), llvm::CombinerHelper::matchEqualDefs(), llvm::CombinerHelper::matchHoistLogicOpWithSameOpcodeHands(), llvm::CombinerHelper::matchOperandIsUndef(), matchSwap(), mergeOperations(), MIIsInTerminatorSequence(), llvm::MachineRegisterInfo::moveOperands(), llvm::PeelingModuloScheduleExpander::moveStageBetweenBlocks(), llvm::SIInstrInfo::moveToVALU(), oneUseDominatesOtherUses(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeLoadInstr(), llvm::SMSchedule::orderDependence(), parseOperands(), llvm::TargetInstrInfo::PredicateInstruction(), llvm::MachineInstr::print(), llvm::AVRAsmPrinter::PrintAsmMemoryOperand(), llvm::HexagonAsmPrinter::PrintAsmMemoryOperand(), llvm::ARMAsmPrinter::PrintAsmMemoryOperand(), llvm::MipsAsmPrinter::PrintAsmMemoryOperand(), llvm::AVRAsmPrinter::PrintAsmOperand(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::X86AsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), llvm::AMDGPUAsmPrinter::PrintAsmOperand(), llvm::AsmPrinter::PrintAsmOperand(), producesFalseLanesZero(), readsReg(), llvm::MachineInstr::readsWritesVirtualRegister(), RemoveDeadAddBetweenLEAAndJT(), removeRegisterOperands(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), llvm::PPCFrameLowering::replaceFPWithRealFP(), rescheduleCanonically(), llvm::R600SchedStrategy::schedNode(), setImplicit(), setIsDead(), setIsDebug(), setIsDef(), setIsEarlyClobber(), setIsInternalRead(), setIsKill(), setIsRenamable(), setIsUndef(), llvm::MachineInstr::setPhysRegsDeadExcept(), llvm::MachineInstr::setRegisterDefReadUndef(), setSubReg(), setTargetFlags(), llvm::AArch64InstrInfo::shouldClusterMemOps(), llvm::PPCInstrInfo::shouldClusterMemOps(), shrinkScalarCompare(), shrinkScalarLogicOp(), SinkingPreventsImplicitNullCheck(), llvm::MachineInstr::substituteRegister(), tryAddToFoldList(), llvm::tryFoldSPUpdateIntoPushPop(), tryToFoldACImm(), llvm::X86InstrInfo::unfoldMemoryOperand(), llvm::MachineInstr::untieRegOperand(), UpdateCPSRDef(), UpdateCPSRUse(), updateKillStatus(), updateOperand(), UpdateOperandRegClass(), updateOperandRegConstraints(), updatePhysDepsDownwards(), updatePhysDepsUpwards(), UseReg(), llvm::SIInstrInfo::usesConstantBus(), llvm::RegisterBankInfo::InstructionMapping::verify(), llvm::SIInstrInfo::verifyInstruction(), VerifyLowRegs(), llvm::MachineRegisterInfo::verifyUseList(), and llvm::WebAssemblyDebugValueManager::WebAssemblyDebugValueManager().

◆ isRegLiveOut()

bool llvm::MachineOperand::isRegLiveOut ( ) const
inline

isRegLiveOut - Tests if this is a MO_RegisterLiveOut operand.

Definition at line 344 of file MachineOperand.h.

References MO_RegisterLiveOut.

Referenced by getRegLiveOut().

◆ isRegMask()

bool llvm::MachineOperand::isRegMask ( ) const
inline

◆ isRenamable()

bool MachineOperand::isRenamable ( ) const

isRenamable - Returns true if this register may be renamed, i.e.

it does not generate a value that is somehow read in a way that is not represented by the Machine IR (e.g. to meet an ABI or ISA requirement). This is only valid on physical register operands. Virtual registers are assumed to always be renamable regardless of the value of this field.

Operands that are renamable can freely be changed to any other register that is a member of the register class returned by MI->getRegClassConstraint().

isRenamable can return false for several different reasons:

  • ABI constraints (since liveness is not always precisely modeled). We conservatively handle these cases by setting all physical register operands that didn’t start out as virtual regs to not be renamable. Also any physical register operands created after register allocation or whose register is changed after register allocation will not be renamable. This state is tracked in the MachineOperand::IsRenamable bit.
  • Opcode/target constraints: for opcodes that have complex register class requirements (e.g. that depend on other operands/instructions), we set hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq in the machine opcode description. Operands belonging to instructions with opcodes that are marked hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq return false from isRenamable(). Additionally, the AllowRegisterRenaming target property prevents any operands from being marked renamable for targets that don't have detailed opcode hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq values.

Definition at line 118 of file MachineOperand.cpp.

References assert(), getParent(), getReg(), llvm::MachineInstr::IgnoreBundle, isDef(), llvm::Register::isPhysicalRegister(), isReg(), isUse(), and MI.

Referenced by canRenameUpToDef(), CreateReg(), getMopState(), llvm::getRegState(), and print().

◆ isShuffleMask()

bool llvm::MachineOperand::isShuffleMask ( ) const
inline

Definition at line 351 of file MachineOperand.h.

References MO_ShuffleMask.

Referenced by getShuffleMask().

◆ isSymbol()

bool llvm::MachineOperand::isSymbol ( ) const
inline

◆ isTargetIndex()

bool llvm::MachineOperand::isTargetIndex ( ) const
inline

isTargetIndex - Tests if this is a MO_TargetIndex operand.

Definition at line 332 of file MachineOperand.h.

References MO_TargetIndex.

Referenced by getIndex(), getOffset(), llvm::SIInstrInfo::isImmOperandLegal(), llvm::SIInstrInfo::isLegalVSrcOperand(), llvm::SIInstrInfo::isOperandLegal(), setIndex(), and setOffset().

◆ isTied()

bool llvm::MachineOperand::isTied ( ) const
inline

◆ isUndef()

bool llvm::MachineOperand::isUndef ( ) const
inline

◆ isUse()

bool llvm::MachineOperand::isUse ( ) const
inline

◆ print() [1/3]

void MachineOperand::print ( raw_ostream os,
const TargetRegisterInfo TRI = nullptr,
const TargetIntrinsicInfo IntrinsicInfo = nullptr 
) const

Print the MachineOperand to os.

Providing a valid TRI and IntrinsicInfo results in a more target-specific printing. If TRI and IntrinsicInfo are null, the function will try to pick it up from the parent.

Definition at line 718 of file MachineOperand.cpp.

References TRI.

Referenced by llvm::operator<<(), print(), and llvm::MachineInstr::print().

◆ print() [2/3]

void MachineOperand::print ( raw_ostream os,
LLT  TypeToPrint,
const TargetRegisterInfo TRI = nullptr,
const TargetIntrinsicInfo IntrinsicInfo = nullptr 
) const

Same as print(os, TRI, IntrinsicInfo), but allows to specify the low-level type to be printed the same way the full version of print(...) does it.

Definition at line 723 of file MachineOperand.cpp.

References llvm::None, print(), TRI, and tryToGetTargetInfo().

◆ print() [3/3]

void MachineOperand::print ( raw_ostream os,
ModuleSlotTracker MST,
LLT  TypeToPrint,
Optional< unsigned >  OpIdx,
bool  PrintDef,
bool  IsStandalone,
bool  ShouldPrintRegisterTies,
unsigned  TiedOperandIdx,
const TargetRegisterInfo TRI,
const TargetIntrinsicInfo IntrinsicInfo 
) const

More complex way of printing a MachineOperand.

Parameters
TypeToPrintspecifies the generic type to be printed on uses and defs. It can be determined using MachineInstr::getTypeToPrint.
OpIdx- specifies the index of the operand in machine instruction. This will be used by target dependent MIR formatter. Could be None if the index is unknown, e.g. called by dump().
PrintDef- whether we want to print def on an operand which isDef. Sometimes, if the operand is printed before '=', we don't print def.
IsStandalone- whether we want a verbose output of the MO. This prints extra information that can be easily inferred when printing the whole function, but not when printing only a fragment of it.
ShouldPrintRegisterTies- whether we want to print register ties. Sometimes they are easily determined by the instruction's descriptor (MachineInstr::hasComplexRegiterTies can determine if it's needed).
TiedOperandIdx- if we need to print register ties this needs to provide the index of the tied register. If not, it will be ignored.
TRI- provide more target-specific information to the printer. Unlike the previous function, this one will not try and get the information from it's parent.
IntrinsicInfo- same as TRI.

Definition at line 734 of file MachineOperand.cpp.

References assert(), llvm::MachineRegisterInfo::def_empty(), E, llvm::ISD::FrameIndex, getBlockAddress(), getCFIIndex(), getCImm(), getFPImm(), llvm::BlockAddress::getFunction(), getGlobal(), getImm(), getIndex(), getIntrinsicID(), getMBB(), getMCSymbol(), getMetadata(), getMFIfAvailable(), llvm::TargetIntrinsicInfo::getName(), llvm::Intrinsic::getName(), llvm::MCRegisterInfo::getNumRegs(), getOffset(), getParent(), getPredicate(), llvm::CmpInst::getPredicateName(), getReg(), getRegLiveOut(), getRegMask(), getShuffleMask(), getSubReg(), llvm::TargetRegisterInfo::getSubRegIndexName(), getSymbolName(), getTargetIndexName(), getType(), i, isDead(), isDef(), isEarlyClobber(), isImplicit(), isInternalRead(), llvm::CmpInst::isIntPredicate(), isKill(), llvm::Register::isPhysicalRegister(), isRenamable(), isTied(), isUndef(), llvm::LLT::isValid(), llvm::Register::isVirtualRegister(), llvm::BitmaskEnumDetail::Mask(), MO_BlockAddress, MO_CFIIndex, MO_CImmediate, MO_ConstantPoolIndex, MO_ExternalSymbol, MO_FPImmediate, MO_FrameIndex, MO_GlobalAddress, MO_Immediate, MO_IntrinsicID, MO_JumpTableIndex, MO_MachineBasicBlock, MO_MCSymbol, MO_Metadata, MO_Predicate, MO_Register, MO_RegisterLiveOut, MO_RegisterMask, MO_ShuffleMask, MO_TargetIndex, MRI, llvm::None, llvm::Metadata::printAsOperand(), llvm::Value::printAsOperand(), printCFI(), printFrameIndex(), llvm::MIRFormatter::printImm(), printIRBlockReference(), llvm::printJumpTableEntryReference(), llvm::printLLVMNameWithoutPrefix(), llvm::printMBBReference(), printOperandOffset(), llvm::printReg(), llvm::printRegClassOrBank(), PrintRegMaskNumRegs, printSymbol(), printTargetFlags(), Reg, SubReg, TII, and TRI.

◆ printIRSlotNumber()

void MachineOperand::printIRSlotNumber ( raw_ostream OS,
int  Slot 
)
static

Print an IRSlotNumber.

Definition at line 604 of file MachineOperand.cpp.

Referenced by printIRBlockReference(), and llvm::MIRFormatter::printIRValue().

◆ printOperandOffset()

void MachineOperand::printOperandOffset ( raw_ostream OS,
int64_t  Offset 
)
static

Print the offset with explicit +/- signs.

Definition at line 594 of file MachineOperand.cpp.

References Offset.

Referenced by print(), and llvm::MachineMemOperand::print().

◆ printStackObjectReference()

void MachineOperand::printStackObjectReference ( raw_ostream OS,
unsigned  FrameIndex,
bool  IsFixed,
StringRef  Name 
)
static

Print a stack object reference.

Definition at line 581 of file MachineOperand.cpp.

References llvm::ISD::FrameIndex.

Referenced by printFrameIndex(), and llvm::MIPrinter::printStackObjectReference().

◆ printSubRegIdx()

void MachineOperand::printSubRegIdx ( raw_ostream OS,
uint64_t  Index,
const TargetRegisterInfo TRI 
)
static

Print a subreg index operand.

MO_Immediate operands can also be subreg idices. If it's the case, the subreg index name will be printed. MachineInstr::isOperandSubregIdx can be called to check this.

Definition at line 516 of file MachineOperand.cpp.

References llvm::TargetRegisterInfo::getSubRegIndexName(), Index, and TRI.

Referenced by llvm::MIPrinter::print(), and llvm::MachineInstr::print().

◆ printSymbol()

void MachineOperand::printSymbol ( raw_ostream OS,
MCSymbol Sym 
)
static

Print a MCSymbol as an operand.

Definition at line 577 of file MachineOperand.cpp.

Referenced by llvm::MIPrinter::print(), print(), llvm::MachineInstr::print(), and printCFI().

◆ printTargetFlags()

void MachineOperand::printTargetFlags ( raw_ostream OS,
const MachineOperand Op 
)
static

◆ readsReg()

bool llvm::MachineOperand::readsReg ( ) const
inline

readsReg - Returns true if this operand reads the previous value of its register.

A use operand with the <undef> flag set doesn't read its register. A sub-register def implicitly reads the other parts of the register being redefined unless the <undef> flag is set.

This refers to reading the register value from before the current instruction or bundle. Internal bundle reads are not included.

Definition at line 455 of file MachineOperand.h.

References assert(), getSubReg(), isInternalRead(), isReg(), isUndef(), and isUse().

Referenced by llvm::AnalyzePhysRegInBundle(), llvm::AnalyzeVirtRegInBundle(), llvm::ScheduleDAGInstrs::buildSchedGraph(), findUseIdx(), getDataDeps(), llvm::ARMBaseInstrInfo::getPartialRegUpdateClearance(), llvm::X86InstrInfo::getPartialRegUpdateClearance(), updatePhysDepsDownwards(), and updatePhysDepsUpwards().

◆ setCImm()

void llvm::MachineOperand::setCImm ( const ConstantInt CI)
inline

Definition at line 657 of file MachineOperand.h.

References assert(), and isCImm().

Referenced by llvm::LegalizerHelper::widenScalar().

◆ setFPImm()

void llvm::MachineOperand::setFPImm ( const ConstantFP CFP)
inline

Definition at line 662 of file MachineOperand.h.

References assert(), and isFPImm().

Referenced by llvm::LegalizerHelper::widenScalar().

◆ setImm()

void llvm::MachineOperand::setImm ( int64_t  immVal)
inline

◆ setImplicit()

void llvm::MachineOperand::setImplicit ( bool  Val = true)
inline

◆ setIndex()

void llvm::MachineOperand::setIndex ( int  Idx)
inline

Definition at line 675 of file MachineOperand.h.

References assert(), isCPI(), isFI(), isJTI(), and isTargetIndex().

Referenced by ChangeToFrameIndex(), and ChangeToTargetIndex().

◆ setIntrinsicID()

void llvm::MachineOperand::setIntrinsicID ( Intrinsic::ID  IID)
inline

Definition at line 700 of file MachineOperand.h.

References assert(), and isIntrinsicID().

◆ setIsDead()

void llvm::MachineOperand::setIsDead ( bool  Val = true)
inline

◆ setIsDebug()

void llvm::MachineOperand::setIsDebug ( bool  Val = true)
inline

Definition at line 525 of file MachineOperand.h.

References assert(), and isReg().

◆ setIsDef()

void MachineOperand::setIsDef ( bool  Val = true)

◆ setIsEarlyClobber()

void llvm::MachineOperand::setIsEarlyClobber ( bool  Val = true)
inline

Definition at line 520 of file MachineOperand.h.

References assert(), and isReg().

Referenced by llvm::MachineInstr::addOperand().

◆ setIsInternalRead()

void llvm::MachineOperand::setIsInternalRead ( bool  Val = true)
inline

◆ setIsKill()

void llvm::MachineOperand::setIsKill ( bool  Val = true)
inline

◆ setIsRenamable()

void MachineOperand::setIsRenamable ( bool  Val = true)

◆ setIsUndef()

void llvm::MachineOperand::setIsUndef ( bool  Val = true)
inline

◆ setIsUse()

void llvm::MachineOperand::setIsUse ( bool  Val = true)
inline

Definition at line 487 of file MachineOperand.h.

References setIsDef().

◆ setMBB()

void llvm::MachineOperand::setMBB ( MachineBasicBlock MBB)
inline

◆ setMetadata()

void llvm::MachineOperand::setMetadata ( const MDNode MD)
inline

Definition at line 681 of file MachineOperand.h.

References assert(), and isMetadata().

Referenced by llvm::updateDbgValueForSpill().

◆ setOffset()

void llvm::MachineOperand::setOffset ( int64_t  Offset)
inline

◆ setPredicate()

void llvm::MachineOperand::setPredicate ( unsigned  Predicate)
inline

Definition at line 705 of file MachineOperand.h.

References assert(), and isPredicate().

Referenced by llvm::CombinerHelper::applyNotCmp().

◆ setReg()

void MachineOperand::setReg ( Register  Reg)

Change the register this operand corresponds to.

Definition at line 55 of file MachineOperand.cpp.

References llvm::MachineRegisterInfo::addRegOperandToUseList(), getMFIfAvailable(), getReg(), MRI, Reg, and llvm::MachineRegisterInfo::removeRegOperandFromUseList().

Referenced by applyAdjustICmpImmAndPred(), llvm::CombinerHelper::applyCombineExtendingLoads(), llvm::RegisterBankInfo::applyDefaultMapping(), llvm::SwingSchedulerDAG::applyInstrChange(), llvm::CombinerHelper::applyOptBrCondByInvertingCond(), llvm::LegalizerHelper::bitcastDst(), llvm::R600InstrInfo::buildSlotOfVectorInstruction(), llvm::TargetInstrInfo::commuteInstructionImpl(), llvm::constrainOperandRegClass(), copyRegOperand(), copySubReg(), llvm::SIRegisterInfo::eliminateFrameIndex(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), emitLoadSRsrcFromVGPRLoop(), llvm::M68kInstrInfo::ExpandCCR(), ExpandMOVImmSExti8(), llvm::M68kInstrInfo::ExpandMOVSZX_RM(), llvm::M68kInstrInfo::ExpandMOVX_RR(), expandNOVLXLoad(), expandNOVLXStore(), llvm::X86InstrInfo::expandPostRAPseudo(), llvm::PPCInstrInfo::finalizeInsInstrs(), fixupPHIOpBanks(), llvm::SwingSchedulerDAG::fixupRegisterOverlaps(), llvm::SIInstrInfo::FoldImmediate(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::SIInstrInfo::legalizeOperands(), llvm::SIInstrInfo::legalizeOperandsFLAT(), llvm::SIInstrInfo::legalizeOperandsSMRD(), llvm::X86InstrInfo::loadRegFromStackSlot(), llvm::X86CallLowering::lowerCall(), maybeRewriteToDrop(), llvm::LegalizerHelper::moreElementsVectorDst(), llvm::LegalizerHelper::moreElementsVectorSrc(), moveAndTeeForMultiUse(), llvm::PeelingModuloScheduleExpander::moveStageBetweenBlocks(), llvm::SIInstrInfo::moveToVALU(), llvm::LegalizerHelper::narrowScalar(), llvm::LegalizerHelper::narrowScalarDst(), llvm::LegalizerHelper::narrowScalarSrc(), llvm::PeelSingleBlockLoop(), llvm::R600InstrInfo::PredicateInstruction(), llvm::TargetInstrInfo::PredicateInstruction(), reinsertVectorIndexAdd(), llvm::PPCFrameLowering::replaceFPWithRealFP(), llvm::CombinerHelper::replaceRegOpWith(), llvm::R600InstrInfo::reverseBranchCondition(), llvm::MachineSSAUpdater::RewriteUse(), selectCopy(), llvm::X86InstrInfo::storeRegToStackSlot(), substPhysReg(), substVirtReg(), updateOperand(), llvm::LegalizerHelper::widenScalarDst(), and llvm::LegalizerHelper::widenScalarSrc().

◆ setRegMask()

void llvm::MachineOperand::setRegMask ( const uint32_t RegMaskPtr)
inline

Sets value of register mask operand referencing Mask.

The operand does not take ownership of the memory referenced by Mask, it must remain valid for the lifetime of the operand. See CreateRegMask(). Any physreg with a 0 bit in the mask is clobbered by the instruction.

Definition at line 695 of file MachineOperand.h.

References assert(), and isRegMask().

◆ setSubReg()

void llvm::MachineOperand::setSubReg ( unsigned  subReg)
inline

◆ setTargetFlags()

void llvm::MachineOperand::setTargetFlags ( unsigned  F)
inline

◆ substPhysReg()

void MachineOperand::substPhysReg ( MCRegister  Reg,
const TargetRegisterInfo TRI 
)

substPhysReg - Substitute the current register with the physical register Reg, taking any existing SubReg into account.

For instance, substPhysReg(eax) will change reg1024:sub_8bit to al.

Definition at line 87 of file MachineOperand.cpp.

References assert(), getSubReg(), llvm::TargetRegisterInfo::getSubReg(), isDef(), llvm::Register::isPhysicalRegister(), Reg, setIsUndef(), setReg(), setSubReg(), and TRI.

Referenced by llvm::MachineInstr::substituteRegister().

◆ substVirtReg()

void MachineOperand::substVirtReg ( Register  Reg,
unsigned  SubIdx,
const TargetRegisterInfo TRI 
)

substVirtReg - Substitute the current register with the virtual subregister Reg:SubReg.

Take any existing SubReg index into account, using TargetRegisterInfo to compose the subreg indices if necessary. Reg must be a virtual register, SubIdx can be 0.

Definition at line 77 of file MachineOperand.cpp.

References assert(), llvm::TargetRegisterInfo::composeSubRegIndices(), getSubReg(), Reg, setReg(), setSubReg(), and TRI.

Referenced by llvm::MachineInstr::substituteRegister(), and updateOperand().

Friends And Related Function Documentation

◆ DenseMapInfo< MachineOperand >

friend struct DenseMapInfo< MachineOperand >
friend

Definition at line 948 of file MachineOperand.h.

◆ hash_value

hash_code hash_value ( const MachineOperand MO)
friend

MachineOperand hash_value overload.

Note that this includes the same information in the hash that isIdenticalTo uses for comparison. It is thus suited for use in hash tables which use that function for equality comparisons only. This must stay exactly in sync with isIdenticalTo above.

◆ MachineInstr

friend class MachineInstr
friend

Definition at line 934 of file MachineOperand.h.

◆ MachineRegisterInfo

friend class MachineRegisterInfo
friend

Definition at line 935 of file MachineOperand.h.

Member Data Documentation

◆ OffsetLo

unsigned llvm::MachineOperand::OffsetLo

Definition at line 157 of file MachineOperand.h.

◆ RegNo

unsigned llvm::MachineOperand::RegNo

Definition at line 156 of file MachineOperand.h.


The documentation for this class was generated from the following files: