LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::MachineOperand Class Reference

#include <MachineOperand.h>

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

Public Types

enum  MachineOperandType {
  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_Metadata, MO_MCSymbol
}
 

Public Member Functions

MachineOperandType getType () const
 
unsigned getTargetFlags () const
 
void setTargetFlags (unsigned F)
 
void addTargetFlag (unsigned F)
 
MachineInstrgetParent ()
 
const MachineInstrgetParent () const
 
void clearParent ()
 
void print (raw_ostream &os, const TargetMachine *TM=0) 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 t his 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 isMetadata () const
 isMetadata - Tests if this is a MO_Metadata operand. More...
 
bool isMCSymbol () const
 
unsigned 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 isInternalRead () const
 
bool isEarlyClobber () const
 
bool isTied () const
 
bool isDebug () const
 
bool readsReg () const
 
void setReg (unsigned Reg)
 
void setSubReg (unsigned subReg)
 
void substVirtReg (unsigned Reg, unsigned SubIdx, const TargetRegisterInfo &)
 
void substPhysReg (unsigned Reg, const TargetRegisterInfo &)
 
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 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
 
int64_t getOffset () const
 
const char * getSymbolName () const
 
bool clobbersPhysReg (unsigned PhysReg) const
 clobbersPhysReg - Returns true if this RegMask operand clobbers PhysReg. More...
 
const uint32_t * getRegMask () const
 
const MDNodegetMetadata () const
 
void setImm (int64_t immVal)
 
void setOffset (int64_t Offset)
 
void setIndex (int Idx)
 
void setMBB (MachineBasicBlock *MBB)
 
bool isIdenticalTo (const MachineOperand &Other) const
 
void ChangeToImmediate (int64_t ImmVal)
 
void ChangeToRegister (unsigned Reg, bool isDef, bool isImp=false, bool isKill=false, bool isDead=false, bool isUndef=false, bool isDebug=false)
 

Static Public Member Functions

static bool clobbersPhysReg (const uint32_t *RegMask, unsigned PhysReg)
 
static MachineOperand CreateImm (int64_t Val)
 
static MachineOperand CreateCImm (const ConstantInt *CI)
 
static MachineOperand CreateFPImm (const ConstantFP *CFP)
 
static MachineOperand CreateReg (unsigned 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)
 
static MachineOperand CreateMBB (MachineBasicBlock *MBB, unsigned char TargetFlags=0)
 
static MachineOperand CreateFI (int Idx)
 
static MachineOperand CreateCPI (unsigned Idx, int Offset, unsigned char TargetFlags=0)
 
static MachineOperand CreateTargetIndex (unsigned Idx, int64_t Offset, unsigned char TargetFlags=0)
 
static MachineOperand CreateJTI (unsigned Idx, unsigned char TargetFlags=0)
 
static MachineOperand CreateGA (const GlobalValue *GV, int64_t Offset, unsigned char TargetFlags=0)
 
static MachineOperand CreateES (const char *SymName, unsigned char TargetFlags=0)
 
static MachineOperand CreateBA (const BlockAddress *BA, int64_t Offset, unsigned char TargetFlags=0)
 
static MachineOperand CreateRegMask (const uint32_t *Mask)
 
static MachineOperand CreateMetadata (const MDNode *Meta)
 
static MachineOperand CreateMCSymbol (MCSymbol *Sym)
 

Friends

class MachineInstr
 
class MachineRegisterInfo
 
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 43 of file MachineOperand.h.

Member Enumeration Documentation

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_Metadata 

Metadata reference (for debug info)

MO_MCSymbol 

MCSymbol reference (for debug/eh info)

Definition at line 45 of file MachineOperand.h.

Member Function Documentation

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

Definition at line 195 of file MachineOperand.h.

References F(), and isReg().

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

void MachineOperand::ChangeToImmediate ( int64_t  ImmVal)
void MachineOperand::ChangeToRegister ( unsigned  Reg,
bool  isDef,
bool  isImp = false,
bool  isKill = false,
bool  isDead = false,
bool  isUndef = false,
bool  isDebug = false 
)
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 215 of file MachineOperand.h.

static bool llvm::MachineOperand::clobbersPhysReg ( const uint32_t *  RegMask,
unsigned  PhysReg 
)
inlinestatic
bool llvm::MachineOperand::clobbersPhysReg ( unsigned  PhysReg) const
inline

clobbersPhysReg - Returns true if this RegMask operand clobbers PhysReg.

Definition at line 468 of file MachineOperand.h.

References clobbersPhysReg(), and getRegMask().

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

Definition at line 548 of file MachineOperand.h.

References CI, and MO_CImmediate.

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

static MachineOperand llvm::MachineOperand::CreateCPI ( unsigned  Idx,
int  Offset,
unsigned char  TargetFlags = 0 
)
inlinestatic
static MachineOperand llvm::MachineOperand::CreateES ( const char *  SymName,
unsigned char  TargetFlags = 0 
)
inlinestatic
static MachineOperand llvm::MachineOperand::CreateFI ( int  Idx)
inlinestatic
static MachineOperand llvm::MachineOperand::CreateFPImm ( const ConstantFP CFP)
inlinestatic

Definition at line 554 of file MachineOperand.h.

References CFP, and MO_FPImmediate.

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

static MachineOperand llvm::MachineOperand::CreateGA ( const GlobalValue GV,
int64_t  Offset,
unsigned char  TargetFlags = 0 
)
inlinestatic
static MachineOperand llvm::MachineOperand::CreateImm ( int64_t  Val)
inlinestatic
static MachineOperand llvm::MachineOperand::CreateJTI ( unsigned  Idx,
unsigned char  TargetFlags = 0 
)
inlinestatic
static MachineOperand llvm::MachineOperand::CreateMBB ( MachineBasicBlock MBB,
unsigned char  TargetFlags = 0 
)
inlinestatic

Definition at line 583 of file MachineOperand.h.

References MO_MachineBasicBlock, setMBB(), and setTargetFlags().

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

static MachineOperand llvm::MachineOperand::CreateMCSymbol ( MCSymbol Sym)
inlinestatic

Definition at line 666 of file MachineOperand.h.

References MO_MCSymbol, and Sym.

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

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

Definition at line 660 of file MachineOperand.h.

References MD, and MO_Metadata.

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

static MachineOperand llvm::MachineOperand::CreateReg ( unsigned  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 
)
inlinestatic
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 654 of file MachineOperand.h.

References MO_RegisterMask, and RegMask.

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

static MachineOperand llvm::MachineOperand::CreateTargetIndex ( unsigned  Idx,
int64_t  Offset,
unsigned char  TargetFlags = 0 
)
inlinestatic
const BlockAddress* llvm::MachineOperand::getBlockAddress ( ) const
inline
const ConstantInt* llvm::MachineOperand::getCImm ( ) const
inline

Definition at line 407 of file MachineOperand.h.

References isCImm().

Referenced by emitDebugValueComment(), getDebugLocEntry(), llvm::hash_value(), and isIdenticalTo().

const ConstantFP* llvm::MachineOperand::getFPImm ( ) const
inline
const GlobalValue* llvm::MachineOperand::getGlobal ( ) const
inline
int64_t llvm::MachineOperand::getImm ( ) const
inline

Definition at line 402 of file MachineOperand.h.

References isImm().

Referenced by llvm::CompileUnit::addConstantValue(), llvm::MachineInstrBuilder::addDisp(), llvm::R600InstrInfo::addFlag(), adjustDefLatency(), llvm::SITargetLowering::AdjustInstrPostInstrSelection(), llvm::HexagonInstrInfo::analyzeCompare(), llvm::SystemZInstrInfo::analyzeCompare(), llvm::ARMBaseInstrInfo::analyzeCompare(), llvm::PPCInstrInfo::analyzeCompare(), llvm::X86InstrInfo::analyzeCompare(), llvm::R600InstrInfo::buildSlotOfVectorInstruction(), canCompareBeNewValueJump(), llvm::R600InstrInfo::clearFlag(), llvm::SIInstrInfo::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::X86InstrInfo::commuteInstruction(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::SystemZInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::SparcFrameLowering::eliminateCallFramePseudoInstr(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::Thumb1FrameLowering::eliminateCallFramePseudoInstr(), llvm::AArch64RegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::NVPTXRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::AArch64TargetLowering::emitAtomicBinary(), llvm::AArch64TargetLowering::emitAtomicBinaryMinMax(), llvm::AArch64TargetLowering::emitAtomicCmpSwap(), emitDebugValueComment(), llvm::PPCFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::AArch64TargetLowering::EmitF128CSEL(), EmitGCCInlineAsmStr(), llvm::SystemZAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMAsmPrinter::EmitJump2Table(), llvm::ARMAsmPrinter::EmitJumpTable(), EmitMSInlineAsmStr(), llvm::MachineInstr::findInlineAsmFlagIdx(), llvm::MachineInstr::findTiedOperandIdx(), llvm::PPCInstrInfo::FoldImmediate(), llvm::ARMBaseInstrInfo::FoldImmediate(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::SystemZInstrInfo::getBranchInfo(), llvm::SystemZInstrInfo::getCompareAndBranch(), getDebugLocEntry(), llvm::ARMBaseRegisterInfo::getFrameIndexInstrOffset(), llvm::getInstrPredicate(), llvm::MipsInstrInfo::GetInstSizeInBytes(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), llvm::NVPTXInstrInfo::getLdStCodeAddrSpace(), getMemoryOpOffset(), getNumMicroOpsSwiftLdSt(), llvm::ARMBaseInstrInfo::getPredicate(), llvm::R600InstrInfo::getSrcs(), getTruncatedShiftCount(), llvm::PatchPointOpers::getVarIdx(), llvm::hash_value(), HashMachineInstr(), llvm::HexagonLowerToMC(), INITIALIZE_PASS(), isCompareZero(), llvm::HexagonInstrInfo::isConstExtended(), isGreaterThan6BitTFRI(), isGreaterThan8BitTFRI(), isIdenticalTo(), llvm::SIInstrInfo::isInlineConstant(), llvm::HexagonInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), isMatchingDecrement(), isMatchingIncrement(), llvm::isParamLoad(), llvm::HexagonInstrInfo::isPredicable(), llvm::R600InstrInfo::isPredicable(), llvm::ARMBaseInstrInfo::isPredicated(), isRedundantFlagInstr(), llvm::isScale(), isShift(), isSimpleBD12Move(), isSimpleMove(), llvm::SystemZInstrInfo::isStackSlotCopy(), llvm::HexagonInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), isSuitableForMask(), llvm::ARMBaseInstrInfo::isSwiftFastImmShift(), isZeroImm(), llvm::MipsInstrInfo::isZeroImm(), llvm::AMDGPUMCInstLower::lower(), llvm::MSP430MCInstLower::Lower(), llvm::MipsMCInstLower::LowerOperand(), llvm::XCoreMCInstLower::LowerOperand(), llvm::SystemZMCInstLower::lowerOperand(), llvm::AArch64AsmPrinter::lowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), LowerPATCHPOINT(), llvm::LowerPPCMachineInstrToMCInst(), lowerRIEfLow(), lowerRIHigh(), lowerRILow(), LowerSTACKMAP(), llvm::MachineInstr::mayLoad(), llvm::MachineInstr::mayStore(), llvm::PPCRegisterInfo::needsFrameBaseReg(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeSelect(), parseMemoryOperand(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::MachineInstr::print(), llvm::HexagonAsmPrinter::printAddrModeBasePlusOffset(), llvm::SystemZAsmPrinter::PrintAsmMemoryOperand(), llvm::HexagonAsmPrinter::PrintAsmMemoryOperand(), llvm::SystemZAsmPrinter::PrintAsmOperand(), llvm::AArch64AsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::X86AsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), llvm::AsmPrinter::PrintAsmOperand(), llvm::HexagonAsmPrinter::printBranchOperand(), llvm::MipsAsmPrinter::printFCCOperand(), llvm::HexagonAsmPrinter::printFrameIndexOperand(), llvm::HexagonAsmPrinter::printImmOperand(), llvm::X86AsmPrinter::printIntelMemReference(), llvm::X86AsmPrinter::printLeaMemReference(), llvm::HexagonAsmPrinter::printMEMriOperand(), printModifiedGPRAsmOperand(), llvm::HexagonAsmPrinter::printNegImmOperand(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::X86AsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), llvm::X86AsmPrinter::printPCRelImm(), llvm::MipsAsmPrinter::printUnsignedImm(), llvm::MipsAsmPrinter::printUnsignedImm8(), llvm::StackMaps::recordStackMap(), llvm::PPCRegisterInfo::resolveFrameIndex(), llvm::R600InstrInfo::ReverseBranchCondition(), llvm::rewriteARMFrameIndex(), llvm::Thumb1RegisterInfo::rewriteFrameIndex(), llvm::rewriteT2FrameIndex(), llvm::SelectionDAGISel::runOnMachineFunction(), and llvm::X86InstrInfo::unfoldMemoryOperand().

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

Definition at line 422 of file MachineOperand.h.

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

Referenced by llvm::ARMBaseInstrInfo::duplicate(), llvm::AArch64RegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::NVPTXRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), emitDebugValueComment(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMAsmPrinter::EmitJump2Table(), llvm::ARMAsmPrinter::EmitJumpTable(), llvm::MSP430MCInstLower::GetConstantPoolIndexSymbol(), llvm::SystemZMCInstLower::getExpr(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), llvm::MSP430MCInstLower::GetJumpTableSymbol(), llvm::hash_value(), HashMachineInstr(), llvm::HexagonLowerToMC(), isIdenticalTo(), llvm::MipsSEInstrInfo::isLoadFromStackSlot(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::HexagonInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), isSimpleMove(), llvm::SystemZInstrInfo::isStackSlotCopy(), llvm::MipsSEInstrInfo::isStoreToStackSlot(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::HexagonInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::AArch64AsmPrinter::lowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::LowerPPCMachineInstrToMCInst(), MatchingStackOffset(), llvm::BranchFolder::OptimizeFunction(), llvm::HexagonAsmPrinter::printConstantPool(), llvm::HexagonAsmPrinter::printJumpTable(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), llvm::AArch64AsmPrinter::printSymbolicAddress(), llvm::X86AsmPrinter::printSymbolOperand(), llvm::ARMBaseInstrInfo::produceSameValue(), and llvm::ARMBaseInstrInfo::reMaterialize().

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

Definition at line 438 of file MachineOperand.h.

References isMCSymbol().

Referenced by llvm::AsmPrinter::emitPrologLabel(), llvm::hash_value(), and isIdenticalTo().

const MDNode* llvm::MachineOperand::getMetadata ( ) const
inline
int64_t llvm::MachineOperand::getOffset ( ) const
inline
MachineInstr* llvm::MachineOperand::getParent ( )
inline
const MachineInstr* llvm::MachineOperand::getParent ( ) const
inline

Definition at line 205 of file MachineOperand.h.

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

getReg - Returns the register number.

Definition at line 259 of file MachineOperand.h.

References isReg().

Referenced by addLiveInRegs(), llvm::ScheduleDAGInstrs::addPhysRegDataDeps(), llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::MachineInstr::addRegisterDead(), llvm::MachineInstr::addRegisterDefined(), llvm::MachineInstr::addRegisterKilled(), llvm::MachineRegisterInfo::addRegOperandToUseList(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::ScheduleDAGInstrs::addVRegDefDeps(), llvm::ScheduleDAGInstrs::addVRegUseDeps(), llvm::SITargetLowering::AdjustInstrPostInstrSelection(), llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), llvm::HexagonInstrInfo::analyzeCompare(), llvm::SystemZInstrInfo::analyzeCompare(), llvm::ARMBaseInstrInfo::analyzeCompare(), llvm::PPCInstrInfo::analyzeCompare(), llvm::X86InstrInfo::analyzeCompare(), llvm::MachineOperandIteratorBase::analyzePhysReg(), llvm::MachineOperandIteratorBase::analyzeVirtReg(), llvm::DwarfDebug::beginFunction(), biasPhysRegCopy(), llvm::CriticalAntiDepBreaker::BreakAntiDependencies(), llvm::ARMBaseInstrInfo::breakPartialRegDependency(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::R600InstrInfo::buildSlotOfVectorInstruction(), canCompareBeNewValueJump(), canFoldCopy(), canFoldIntoMOVCC(), llvm::X86InstrInfo::classifyLEAReg(), llvm::MachineInstr::clearRegisterKills(), clobbersCTR(), RegisterOperands::collect(), collectDebugValues(), llvm::SIInstrInfo::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::TargetInstrInfo::commuteInstruction(), llvm::TargetSchedModel::computeOutputLatency(), llvm::CompileUnit::constructVariableDIE(), llvm::AMDGPUInstrInfo::convertToISA(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::SystemZInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), copyHint(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), definesCPSR(), llvm::ARMBaseInstrInfo::DefinesPredicate(), llvm::HexagonInstrInfo::DefinesPredicate(), llvm::PPCInstrInfo::DefinesPredicate(), determineREX(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::AArch64TargetLowering::emitAtomicBinary(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::AArch64TargetLowering::emitAtomicBinaryMinMax(), llvm::AArch64TargetLowering::emitAtomicCmpSwap(), emitDebugValueComment(), llvm::PPCTargetLowering::emitEHSjLjLongJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::ARMFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::AsmPrinter::emitImplicitDef(), llvm::SystemZAsmPrinter::EmitInstruction(), llvm::X86AsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), emitKill(), EmitMonitor(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), EmitPCMPSTRI(), EmitPCMPSTRM(), llvm::AMDGPUAsmPrinter::EmitProgramInfoR600(), llvm::AMDGPUAsmPrinter::EmitProgramInfoSI(), llvm::MSP430TargetLowering::EmitShiftInstr(), EmitXBegin(), eraseIfDead(), Expand2AddrUndef(), expandPseudoDIV(), llvm::finalizeBundle(), findDeadCallerSavedReg(), findHoistingInsertPosAndDeps(), llvm::MachineInstr::findRegisterDefOperandIdx(), llvm::MachineInstr::findRegisterUseOperandIdx(), finishConvertToThreeAddress(), llvm::PPCInstrInfo::FoldImmediate(), llvm::ARMBaseInstrInfo::FoldImmediate(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::X86InstrInfo::foldMemoryOperandImpl(), foldPatchpoint(), for(), forceReg(), llvm::RegScavenger::forward(), getCopyOrBitcastDefUseIdx(), getDebugLocEntry(), getFPReg(), llvm::MachineInstrExpressionTrait::getHashValue(), llvm::getInstrPredicate(), getNumMicroOpsSwiftLdSt(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::SIInstrInfo::getOpRegClass(), llvm::ARMBaseInstrInfo::getPartialRegUpdateClearance(), llvm::X86InstrInfo::getPartialRegUpdateClearance(), getPHIDeps(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetPHIValue(), GetPostIncrementOperand(), getPredicatedRegister(), getRegsUsedByPHIs(), llvm::R600InstrInfo::getSrcs(), llvm::X86InstrInfo::getUndefRegClearance(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetUndefVal(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), HandleVRSaveUpdate(), llvm::hash_value(), HashMachineInstr(), hasLiveCondCodeDef(), hasRAWHazard(), hasVGPROperands(), hasYmmReg(), llvm::HexagonLowerToMC(), INITIALIZE_PASS(), Is16BitMemOperand(), Is32BitMemOperand(), Is64BitMemOperand(), llvm::PPCInstrInfo::isCoalescableExtInstr(), llvm::X86InstrInfo::isCoalescableExtInstr(), llvm::MachineInstr::isConstantValuePHI(), isCopyToReg(), isCSRestore(), isDbgValueInDefinedReg(), isFullCopyOf(), isIdenticalTo(), llvm::MachineInstr::isIdenticalTo(), llvm::MachineInstr::isIdentityCopy(), llvm::MipsSEInstrInfo::isLoadFromStackSlot(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::HexagonInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlot(), isLocalCopy(), isMatchingDecrement(), isMatchingIncrement(), llvm::NVPTXInstrInfo::isMoveInstr(), isNopCopy(), isOperandKill(), isPhysicalRegCopy(), llvm::R600InstrInfo::isPredicated(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), isRedundantFlagInstr(), IsSafeAndProfitableToMove(), isSafeToClobberEFLAGS(), isShift(), isSimpleBD12Move(), isSimpleMove(), isSourceDefinedByImplicitDef(), llvm::MipsSEInstrInfo::isStoreToStackSlot(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::HexagonInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlot(), isSuitableForMask(), isTwoAddrUse(), llvm::X86InstrInfo::isX86_64ExtendedReg(), llvm::SIInstrInfo::legalizeOperands(), llvm::Mips16InstrInfo::loadImmediate(), llvm::AMDGPUMCInstLower::lower(), llvm::MSP430MCInstLower::Lower(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::MipsMCInstLower::LowerOperand(), llvm::XCoreMCInstLower::LowerOperand(), llvm::SystemZMCInstLower::lowerOperand(), llvm::AArch64AsmPrinter::lowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), LowerPATCHPOINT(), llvm::LowerPPCMachineInstrToMCInst(), lowerRIEfLow(), lowerRIHigh(), lowerRILow(), llvm::PPCRegisterInfo::lowerVRSAVERestore(), llvm::PPCRegisterInfo::lowerVRSAVESpilling(), MaySpeculate(), MIIsInTerminatorSequence(), llvm::MachineRegisterInfo::moveOperands(), llvm::SIInstrInfo::moveToVALU(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeLoadInstr(), llvm::ARMBaseInstrInfo::optimizeSelect(), parseMemoryOperand(), llvm::HexagonInstrInfo::PredicateInstruction(), print(), llvm::MachineInstr::print(), llvm::HexagonAsmPrinter::printAddrModeBasePlusOffset(), llvm::SystemZAsmPrinter::PrintAsmMemoryOperand(), llvm::AArch64AsmPrinter::PrintAsmMemoryOperand(), llvm::ARMAsmPrinter::PrintAsmMemoryOperand(), llvm::MipsAsmPrinter::PrintAsmMemoryOperand(), llvm::X86AsmPrinter::printAsmMRegister(), llvm::AArch64AsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), llvm::HexagonAsmPrinter::printFrameIndexOperand(), llvm::X86AsmPrinter::printIntelMemReference(), llvm::X86AsmPrinter::printLeaMemReference(), llvm::X86AsmPrinter::printMemReference(), llvm::HexagonAsmPrinter::printMEMriOperand(), printModifiedFPRAsmOperand(), printModifiedGPRAsmOperand(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::X86AsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), llvm::HexagonAsmPrinter::printRegister(), llvm::ARMBaseInstrInfo::produceSameValue(), llvm::MachineInstr::readsWritesVirtualRegister(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::X86InstrInfo::reMaterialize(), llvm::TargetInstrInfo::reMaterialize(), removeIPMBasedCompare(), removeKillInfo(), llvm::MachineRegisterInfo::removeRegOperandFromUseList(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::PPCFrameLowering::replaceFPWithRealFP(), resultTests(), llvm::R600InstrInfo::ReverseBranchCondition(), llvm::Thumb1RegisterInfo::rewriteFrameIndex(), llvm::rewriteT2FrameIndex(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::Thumb1RegisterInfo::saveScavengerRegister(), llvm::RegScavenger::scavengeRegister(), llvm::R600SchedStrategy::schedNode(), llvm::ARMBaseInstrInfo::setExecutionDomain(), llvm::MachineInstr::setPhysRegsDeadExcept(), setReg(), llvm::MachineBasicBlock::SplitCriticalEdge(), llvm::MachineInstr::substituteRegister(), TrackDefUses(), llvm::tryFoldSPUpdateIntoPushPop(), llvm::X86InstrInfo::unfoldMemoryOperand(), UpdateCPSRDef(), UpdateCPSRUse(), llvm::AntiDepBreaker::UpdateDbgValue(), updatePhysDepsDownwards(), updatePhysDepsUpwards(), llvm::SIInstrInfo::verifyInstruction(), VerifyLowRegs(), and llvm::MachineRegisterInfo::verifyUseList().

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

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

Definition at line 474 of file MachineOperand.h.

References isRegMask().

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

unsigned llvm::MachineOperand::getSubReg ( ) const
inline
const char* llvm::MachineOperand::getSymbolName ( ) const
inline
unsigned llvm::MachineOperand::getTargetFlags ( ) const
inline
MachineOperandType llvm::MachineOperand::getType ( ) const
inline
bool llvm::MachineOperand::isBlockAddress ( ) const
inline

isBlockAddress - Tests if this is a MO_BlockAddress operand.

Definition at line 246 of file MachineOperand.h.

References MO_BlockAddress.

Referenced by getBlockAddress(), getOffset(), and setOffset().

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

isCImm - Test if t his is a MO_CImmediate operand.

Definition at line 228 of file MachineOperand.h.

References MO_CImmediate.

Referenced by emitDebugValueComment(), getCImm(), and getDebugLocEntry().

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

isCPI - Tests if this is a MO_ConstantPoolIndex operand.

Definition at line 236 of file MachineOperand.h.

References MO_ConstantPoolIndex.

Referenced by canFoldIntoMOVCC(), getIndex(), getOffset(), llvm::isLeaMem(), llvm::X86AsmPrinter::PrintAsmOperand(), llvm::X86AsmPrinter::printLeaMemReference(), setIndex(), and setOffset().

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

Definition at line 274 of file MachineOperand.h.

References isReg().

Referenced by addLiveInRegs(), llvm::ScheduleDAGInstrs::addPhysRegDataDeps(), llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::MachineInstr::addRegisterDead(), llvm::MachineInstr::addRegisterDefined(), llvm::MachineRegisterInfo::addRegOperandToUseList(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), llvm::MachineOperandIteratorBase::analyzePhysReg(), llvm::MachineOperandIteratorBase::analyzeVirtReg(), llvm::CriticalAntiDepBreaker::BreakAntiDependencies(), llvm::ScheduleDAGInstrs::buildSchedGraph(), canFoldIntoMOVCC(), ChangeToRegister(), clobbersCTR(), RegisterOperands::collect(), llvm::AMDGPUInstrInfo::convertToISA(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), CreateReg(), definesCPSR(), llvm::ARMBaseInstrInfo::DefinesPredicate(), llvm::HexagonInstrInfo::DefinesPredicate(), llvm::PPCInstrInfo::DefinesPredicate(), emitKill(), llvm::LiveRangeCalc::extendToUses(), llvm::finalizeBundle(), findDeadCallerSavedReg(), findDefIdx(), llvm::MachineInstr::findRegisterDefOperandIdx(), for(), llvm::RegScavenger::forward(), getCopyOrBitcastDefUseIdx(), llvm::MachineInstrExpressionTrait::getHashValue(), llvm::PatchPointOpers::getNextScratchIdx(), GetPostIncrementOperand(), llvm::hash_value(), hasLiveCondCodeDef(), isIdenticalTo(), llvm::MachineInstr::isIdenticalTo(), llvm::MachineInstr::isRegTiedToUseOperand(), IsSafeAndProfitableToMove(), isSafeToClobberEFLAGS(), llvm::Mips16InstrInfo::loadImmediate(), MaySpeculate(), MIIsInTerminatorSequence(), llvm::MachineRegisterInfo::defusechain_iterator< Uses, Defs, SkipDebug >::operator++(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeLoadInstr(), llvm::PatchPointOpers::PatchPointOpers(), llvm::HexagonInstrInfo::PredicateInstruction(), print(), llvm::MachineInstr::print(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveIntervals::repairIntervalsInRange(), resultTests(), llvm::MachineInstr::setPhysRegsDeadExcept(), llvm::MachineInstr::tieOperands(), llvm::X86InstrInfo::unfoldMemoryOperand(), and UpdateCPSRUse().

bool llvm::MachineOperand::isEarlyClobber ( ) const
inline
bool llvm::MachineOperand::isFI ( ) const
inline
bool llvm::MachineOperand::isFPImm ( ) const
inline
bool llvm::MachineOperand::isGlobal ( ) const
inline
bool MachineOperand::isIdenticalTo ( const MachineOperand Other) const

isIdenticalTo - Return true if this operand is identical to the specified operand. Note: This method ignores isKill and isDead properties.

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 170 of file MachineInstr.cpp.

References getBlockAddress(), getCImm(), getFPImm(), getGlobal(), getImm(), getIndex(), getMBB(), getMCSymbol(), getMetadata(), getOffset(), getReg(), getRegMask(), getSubReg(), getSymbolName(), getTargetFlags(), getType(), isDef(), llvm_unreachable, MO_BlockAddress, MO_CImmediate, MO_ConstantPoolIndex, MO_ExternalSymbol, MO_FPImmediate, MO_FrameIndex, MO_GlobalAddress, MO_Immediate, MO_JumpTableIndex, MO_MachineBasicBlock, MO_MCSymbol, MO_Metadata, MO_Register, MO_RegisterMask, MO_TargetIndex, and llvm::LibFunc::strcmp.

Referenced by llvm::MachineInstr::isIdenticalTo(), and llvm::ARMBaseInstrInfo::produceSameValue().

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

isImm - Tests if this is a MO_Immediate operand.

Definition at line 226 of file MachineOperand.h.

References MO_Immediate.

Referenced by llvm::CompileUnit::addConstantValue(), llvm::SystemZInstrInfo::analyzeCompare(), llvm::R600InstrInfo::buildSlotOfVectorInstruction(), llvm::X86RegisterInfo::eliminateFrameIndex(), emitDebugValueComment(), llvm::PPCFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::HexagonFrameLowering::emitPrologue(), llvm::MachineInstr::findInlineAsmFlagIdx(), llvm::MachineInstr::findTiedOperandIdx(), llvm::PPCInstrInfo::FoldImmediate(), llvm::ARMBaseInstrInfo::FoldImmediate(), getDebugLocEntry(), llvm::R600InstrInfo::getFlagOp(), getImm(), llvm::HexagonInstrInfo::immediateExtend(), isCompareZero(), llvm::HexagonInstrInfo::isConstExtended(), isDbgValueInDefinedReg(), llvm::MachineInstr::isIndirectDebugValue(), llvm::SIInstrInfo::isInlineConstant(), llvm::isLeaMem(), llvm::SIInstrInfo::isLiteralConstant(), llvm::MipsSEInstrInfo::isLoadFromStackSlot(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::HexagonInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::isParamLoad(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::isScale(), llvm::MipsSEInstrInfo::isStoreToStackSlot(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::HexagonInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), isZeroImm(), llvm::MipsInstrInfo::isZeroImm(), llvm::SIInstrInfo::legalizeOperands(), parseMemoryOperand(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::TargetInstrInfo::PredicateInstruction(), llvm::MachineInstr::print(), llvm::HexagonAsmPrinter::PrintAsmMemoryOperand(), llvm::SystemZAsmPrinter::PrintAsmOperand(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::X86AsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), llvm::HexagonAsmPrinter::printBranchOperand(), llvm::X86AsmPrinter::printIntelMemReference(), llvm::X86AsmPrinter::printLeaMemReference(), printModifiedGPRAsmOperand(), llvm::HexagonAsmPrinter::printSymbolHi(), llvm::HexagonAsmPrinter::printSymbolLo(), llvm::MipsAsmPrinter::printUnsignedImm(), llvm::MipsAsmPrinter::printUnsignedImm8(), setImm(), llvm::R600InstrInfo::setImmOperand(), and llvm::SIInstrInfo::verifyInstruction().

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

Definition at line 299 of file MachineOperand.h.

References isReg().

Referenced by CreateReg(), INITIALIZE_PASS(), print(), and readsReg().

bool llvm::MachineOperand::isJTI ( ) const
inline
bool llvm::MachineOperand::isKill ( ) const
inline
bool llvm::MachineOperand::isMBB ( ) const
inline
bool llvm::MachineOperand::isMCSymbol ( ) const
inline

Definition at line 251 of file MachineOperand.h.

References MO_MCSymbol.

Referenced by getMCSymbol().

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

isMetadata - Tests if this is a MO_Metadata operand.

Definition at line 250 of file MachineOperand.h.

References MO_Metadata.

Referenced by llvm::MachineInstr::emitError(), EmitGCCInlineAsmStr(), EmitMSInlineAsmStr(), getMetadata(), and llvm::MachineInstr::print().

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

isReg - Tests if this is a MO_Register operand.

Definition at line 224 of file MachineOperand.h.

References MO_Register.

Referenced by addLiveInRegs(), llvm::MachineInstr::addOperand(), llvm::MachineInstr::addRegisterDead(), llvm::MachineInstr::addRegisterDefined(), llvm::MachineInstr::addRegisterKilled(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), addTargetFlag(), llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), llvm::MachineInstr::allDefsAreDead(), llvm::SystemZInstrInfo::analyzeCompare(), llvm::MachineOperandIteratorBase::analyzePhysReg(), llvm::MachineOperandIteratorBase::analyzeVirtReg(), llvm::CriticalAntiDepBreaker::BreakAntiDependencies(), llvm::ScheduleDAGInstrs::buildSchedGraph(), canFoldIntoMOVCC(), ChangeToImmediate(), ChangeToRegister(), llvm::MachineInstr::clearKillInfo(), llvm::MachineInstr::clearRegisterKills(), clobbersCTR(), RegisterOperands::collect(), collectDebugValues(), llvm::SIInstrInfo::commuteInstruction(), llvm::TargetInstrInfo::commuteInstruction(), llvm::AMDGPUInstrInfo::convertToISA(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::MachineInstr::copyImplicitOps(), definesCPSR(), llvm::ARMBaseInstrInfo::DefinesPredicate(), llvm::HexagonInstrInfo::DefinesPredicate(), llvm::PPCInstrInfo::DefinesPredicate(), determineREX(), earlyUseOperand(), emitDebugValueComment(), llvm::X86FrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), emitKill(), EmitPCMPSTRI(), EmitPCMPSTRM(), llvm::AMDGPUAsmPrinter::EmitProgramInfoR600(), llvm::AMDGPUAsmPrinter::EmitProgramInfoSI(), llvm::finalizeBundle(), llvm::TargetInstrInfo::findCommutedOpIndices(), findDeadCallerSavedReg(), findDefIdx(), findHoistingInsertPosAndDeps(), llvm::MachineInstr::findRegisterDefOperandIdx(), llvm::MachineInstr::findRegisterUseOperandIdx(), llvm::MachineInstr::findTiedOperandIdx(), findUseIdx(), finishConvertToThreeAddress(), llvm::PPCInstrInfo::FoldImmediate(), llvm::X86InstrInfo::foldMemoryOperandImpl(), for(), forceReg(), llvm::RegScavenger::forward(), FuseInst(), getCopyOrBitcastDefUseIdx(), getDebugLocEntry(), getFPReg(), llvm::MachineInstrExpressionTrait::getHashValue(), llvm::PatchPointOpers::getNextScratchIdx(), llvm::MachineInstr::getNumExplicitOperands(), GetPostIncrementOperand(), getPredicatedRegister(), getReg(), llvm::MachineInstr::getRegClassConstraint(), getStackMapEndMOP(), getSubReg(), getTargetFlags(), HandleVRSaveUpdate(), hasLiveCondCodeDef(), hasVGPROperands(), hasYmmReg(), INITIALIZE_PASS(), isDbgValueInDefinedReg(), isDead(), isDebug(), isDef(), isEarlyClobber(), llvm::MachineInstr::isIdenticalTo(), isImplicit(), llvm::MachineInstr::isIndirectDebugValue(), isInternalRead(), isKill(), llvm::isLeaMem(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::isMem(), isMemoryOp(), llvm::NVPTXInstrInfo::isMoveInstr(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::MachineInstr::isRegTiedToDefOperand(), llvm::MachineInstr::isRegTiedToUseOperand(), IsSafeAndProfitableToMove(), isSafeToClobberEFLAGS(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), isTied(), isTwoAddrUse(), isUndef(), isUse(), llvm::X86InstrInfo::isX86_64ExtendedReg(), llvm::SIInstrInfo::legalizeOperands(), llvm::SIInstrInfo::legalizeOpWithMove(), llvm::Mips16InstrInfo::loadImmediate(), llvm::SystemZMCInstLower::lower(), MaySpeculate(), MIIsInTerminatorSequence(), llvm::MachineRegisterInfo::moveOperands(), llvm::SIInstrInfo::moveToVALU(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeLoadInstr(), parseMemoryOperand(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::TargetInstrInfo::PredicateInstruction(), llvm::MachineInstr::print(), llvm::HexagonAsmPrinter::PrintAsmMemoryOperand(), llvm::AArch64AsmPrinter::PrintAsmMemoryOperand(), llvm::ARMAsmPrinter::PrintAsmMemoryOperand(), llvm::MipsAsmPrinter::PrintAsmMemoryOperand(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::X86AsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), printModifiedFPRAsmOperand(), printModifiedGPRAsmOperand(), readsReg(), llvm::MachineInstr::readsWritesVirtualRegister(), removeKillInfo(), llvm::MachineInstr::RemoveOperand(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::PPCFrameLowering::replaceFPWithRealFP(), resultTests(), llvm::LiveVariables::runOnMachineFunction(), llvm::Thumb1RegisterInfo::saveScavengerRegister(), llvm::RegScavenger::scavengeRegister(), llvm::R600SchedStrategy::schedNode(), setImplicit(), setIsDead(), setIsDebug(), setIsDef(), setIsEarlyClobber(), setIsInternalRead(), setIsKill(), setIsUndef(), llvm::MachineInstr::setPhysRegsDeadExcept(), setSubReg(), setTargetFlags(), llvm::MachineInstr::substituteRegister(), TrackDefUses(), llvm::X86InstrInfo::unfoldMemoryOperand(), UpdateCPSRDef(), UpdateCPSRUse(), llvm::AntiDepBreaker::UpdateDbgValue(), llvm::SIInstrInfo::verifyInstruction(), VerifyLowRegs(), and llvm::MachineRegisterInfo::verifyUseList().

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

isTargetIndex - Tests if this is a MO_TargetIndex operand.

Definition at line 238 of file MachineOperand.h.

References MO_TargetIndex.

Referenced by getIndex(), getOffset(), setIndex(), and setOffset().

bool llvm::MachineOperand::isTied ( ) const
inline
bool llvm::MachineOperand::isUndef ( ) const
inline
bool llvm::MachineOperand::isUse ( ) const
inline
void MachineOperand::print ( raw_ostream OS,
const TargetMachine TM = 0 
) const
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 326 of file MachineOperand.h.

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

Referenced by llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::MachineOperandIteratorBase::analyzePhysReg(), llvm::MachineOperandIteratorBase::analyzeVirtReg(), llvm::ScheduleDAGInstrs::buildSchedGraph(), RegisterOperands::collect(), llvm::ConnectedVNInfoEqClasses::Distribute(), llvm::LiveRangeCalc::extendToUses(), findUseIdx(), llvm::ARMBaseInstrInfo::getPartialRegUpdateClearance(), llvm::X86InstrInfo::getPartialRegUpdateClearance(), and llvm::LiveVariables::runOnMachineFunction().

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

Definition at line 362 of file MachineOperand.h.

References isReg(), and Val.

Referenced by llvm::X86InstrInfo::classifyLEAReg(), and llvm::ARMBaseInstrInfo::optimizeSelect().

void llvm::MachineOperand::setIndex ( int  Idx)
inline
void llvm::MachineOperand::setIsDead ( bool  Val = true)
inline
void llvm::MachineOperand::setIsDebug ( bool  Val = true)
inline

Definition at line 393 of file MachineOperand.h.

References isReg(), and Val.

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

Definition at line 388 of file MachineOperand.h.

References isReg(), and Val.

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

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

Definition at line 383 of file MachineOperand.h.

References isReg(), and Val.

Referenced by llvm::finalizeBundle(), and INITIALIZE_PASS().

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

Definition at line 378 of file MachineOperand.h.

References isReg(), and Val.

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

Definition at line 358 of file MachineOperand.h.

References setIsDef(), and Val.

void llvm::MachineOperand::setMBB ( MachineBasicBlock MBB)
inline
void llvm::MachineOperand::setOffset ( int64_t  Offset)
inline
void MachineOperand::setReg ( unsigned  Reg)
void llvm::MachineOperand::setSubReg ( unsigned  subReg)
inline
void llvm::MachineOperand::setTargetFlags ( unsigned  F)
inline

Definition at line 190 of file MachineOperand.h.

References F(), and isReg().

Referenced by CreateBA(), CreateCPI(), CreateES(), CreateGA(), CreateJTI(), CreateMBB(), and CreateTargetIndex().

void MachineOperand::substPhysReg ( unsigned  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 79 of file MachineInstr.cpp.

References getSubReg(), llvm::MCRegisterInfo::getSubReg(), llvm::TargetRegisterInfo::isPhysicalRegister(), setReg(), and setSubReg().

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

void MachineOperand::substVirtReg ( unsigned  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 69 of file MachineInstr.cpp.

References llvm::TargetRegisterInfo::composeSubRegIndices(), getSubReg(), llvm::TargetRegisterInfo::isVirtualRegister(), setReg(), and setSubReg().

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

Friends And Related Function Documentation

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.

Referenced by llvm::MachineInstrExpressionTrait::getHashValue().

friend class MachineInstr
friend

Definition at line 672 of file MachineOperand.h.

friend class MachineRegisterInfo
friend

Definition at line 673 of file MachineOperand.h.

Member Data Documentation

const BlockAddress* llvm::MachineOperand::BA

Definition at line 173 of file MachineOperand.h.

Referenced by CreateBA().

const ConstantFP* llvm::MachineOperand::CFP

Definition at line 153 of file MachineOperand.h.

Referenced by CreateFPImm().

const ConstantInt* llvm::MachineOperand::CI

Definition at line 154 of file MachineOperand.h.

Referenced by CreateCImm(), and llvm::MachineInstr::emitError().

const GlobalValue* llvm::MachineOperand::GV

Definition at line 172 of file MachineOperand.h.

Referenced by CreateGA().

int64_t llvm::MachineOperand::ImmVal

Definition at line 155 of file MachineOperand.h.

Referenced by ChangeToImmediate().

int llvm::MachineOperand::Index

Definition at line 170 of file MachineOperand.h.

MachineBasicBlock* llvm::MachineOperand::MBB
const MDNode* llvm::MachineOperand::MD

Definition at line 157 of file MachineOperand.h.

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

MachineOperand* llvm::MachineOperand::Next

Definition at line 163 of file MachineOperand.h.

struct { ... } llvm::MachineOperand::OffsetedInfo

OffsetedInfo - This struct contains the offset and an object identifier. this represent the object as with an optional offset from it.

Referenced by CreateBA(), CreateES(), and CreateGA().

int llvm::MachineOperand::OffsetHi

Definition at line 176 of file MachineOperand.h.

unsigned llvm::MachineOperand::OffsetLo

Definition at line 143 of file MachineOperand.h.

MachineOperand* llvm::MachineOperand::Prev

Definition at line 162 of file MachineOperand.h.

struct { ... } llvm::MachineOperand::Reg
const uint32_t* llvm::MachineOperand::RegMask

Definition at line 156 of file MachineOperand.h.

Referenced by CreateRegMask().

unsigned llvm::MachineOperand::RegNo

Definition at line 142 of file MachineOperand.h.

Referenced by CreateReg().

MCSymbol* llvm::MachineOperand::Sym

Definition at line 158 of file MachineOperand.h.

Referenced by CreateMCSymbol().

const char* llvm::MachineOperand::SymbolName

Definition at line 171 of file MachineOperand.h.

union { ... } llvm::MachineOperand::Val

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