LLVM API Documentation

llvm::MachineOperand Class Reference

#include <MachineOperand.h>

Collaboration diagram for llvm::MachineOperand:
[legend]

List of all members.

Public Types

enum  MachineOperandType {
  MO_Register, MO_Immediate, MO_FPImmediate, MO_MachineBasicBlock,
  MO_FrameIndex, MO_ConstantPoolIndex, MO_JumpTableIndex, MO_ExternalSymbol,
  MO_GlobalAddress, MO_Metadata
}

Public Member Functions

MachineOperandType getType () const
unsigned char getTargetFlags () const
void setTargetFlags (unsigned char F)
void addTargetFlag (unsigned char F)
MachineInstr * getParent ()
const MachineInstr * getParent () const
void print (std::ostream &os, const TargetMachine *TM=0) const
void print (raw_ostream &os, const TargetMachine *TM=0) const
bool isReg () const
 isReg - Tests if this is a MO_Register operand.
bool isImm () const
 isImm - Tests if this is a MO_Immediate operand.
bool isFPImm () const
 isFPImm - Tests if this is a MO_FPImmediate operand.
bool isMBB () const
 isMBB - Tests if this is a MO_MachineBasicBlock operand.
bool isFI () const
 isFI - Tests if this is a MO_FrameIndex operand.
bool isCPI () const
 isCPI - Tests if this is a MO_ConstantPoolIndex operand.
bool isJTI () const
 isJTI - Tests if this is a MO_JumpTableIndex operand.
bool isGlobal () const
 isGlobal - Tests if this is a MO_GlobalAddress operand.
bool isSymbol () const
 isSymbol - Tests if this is a MO_ExternalSymbol operand.
bool isMetadata () const
 isMetadata - Tests if this is a MO_Metadata operand.
unsigned getReg () const
 getReg - Returns the register number.
unsigned getSubReg () const
bool isUse () const
bool isDef () const
bool isImplicit () const
bool isDead () const
bool isKill () const
bool isUndef () const
bool isEarlyClobber () const
MachineOperand * getNextOperandForReg () const
void setReg (unsigned Reg)
void setSubReg (unsigned subReg)
void setIsUse (bool Val=true)
void setIsDef (bool Val=true)
void setImplicit (bool Val=true)
void setIsKill (bool Val=true)
void setIsDead (bool Val=true)
void setIsUndef (bool Val=true)
void setIsEarlyClobber (bool Val=true)
int64_t getImm () const
const ConstantFP * getFPImm () const
MachineBasicBlock * getMBB () const
int getIndex () const
GlobalValue * getGlobal () const
MDNode * getMDNode () const
int64_t getOffset () const
const char * getSymbolName () 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)

Static Public Member Functions

static MachineOperand CreateImm (int64_t Val)
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)
static MachineOperand CreateMBB (MachineBasicBlock *MBB, unsigned char TargetFlags=0)
static MachineOperand CreateFI (unsigned Idx)
static MachineOperand CreateCPI (unsigned Idx, int Offset, unsigned char TargetFlags=0)
static MachineOperand CreateJTI (unsigned Idx, unsigned char TargetFlags=0)
static MachineOperand CreateGA (GlobalValue *GV, int64_t Offset, unsigned char TargetFlags=0)
static MachineOperand CreateMDNode (MDNode *N, int64_t Offset, unsigned char TargetFlags=0)
static MachineOperand CreateES (const char *SymName, int64_t Offset=0, unsigned char TargetFlags=0)

Friends

class MachineInstr
class MachineRegisterInfo


Detailed Description

MachineOperand class - Representation of each machine instruction operand.

Definition at line 34 of file MachineOperand.h.


Member Enumeration Documentation

Enumerator:
MO_Register  Register operand.
MO_Immediate  Immediate 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_JumpTableIndex  Address of indexed Jump Table for switch.
MO_ExternalSymbol  Name of external global symbol.
MO_GlobalAddress  Address of a global value.
MO_Metadata  Metadata info.

Definition at line 36 of file MachineOperand.h.


Member Function Documentation

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

unsigned char llvm::MachineOperand::getTargetFlags (  )  const [inline]

void llvm::MachineOperand::setTargetFlags ( unsigned char  F  )  [inline]

Definition at line 127 of file MachineOperand.h.

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

void llvm::MachineOperand::addTargetFlag ( unsigned char  F  )  [inline]

Definition at line 128 of file MachineOperand.h.

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

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

Definition at line 134 of file MachineOperand.h.

void MachineOperand::print ( std::ostream &  OS,
const TargetMachine *  TM = 0 
) const

print - Print the specified machine operand.

Definition at line 186 of file MachineInstr.cpp.

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

void MachineOperand::print ( raw_ostream &  os,
const TargetMachine *  TM = 0 
) const

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

isReg - Tests if this is a MO_Register operand.

Definition at line 144 of file MachineOperand.h.

References MO_Register.

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::addIntervalsForSpillsFast(), llvm::MachineInstr::addRegisterDead(), llvm::MachineInstr::addRegisterKilled(), AssignPhysToVirtReg(), llvm::ScheduleDAGInstrs::BuildSchedGraph(), ChangeToImmediate(), ChangeToRegister(), llvm::TargetInstrInfoImpl::commuteInstruction(), llvm::ScheduleDAGInstrs::ComputeOperandLatency(), llvm::LiveIntervals::conflictsWithPhysRegDef(), llvm::LiveIntervals::conflictsWithPhysRegRef(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::MachineInstr::copyKillDeadInfo(), llvm::ARMBaseInstrInfo::DefinesPredicate(), llvm::X86InstrInfo::determineREX(), llvm::BlackfinRegisterInfo::eliminateFrameIndex(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::TargetInstrInfoImpl::findCommutedOpIndices(), FindFreeRegister(), llvm::MachineInstr::findRegisterDefOperandIdx(), llvm::MachineInstr::findRegisterUseOperandIdx(), llvm::SparcInstrInfo::foldMemoryOperandImpl(), llvm::MipsInstrInfo::foldMemoryOperandImpl(), FoldsStackSlotModRef(), llvm::RegScavenger::forward(), FuseInst(), getFPReg(), getNextOperandForReg(), llvm::MachineInstr::getNumExplicitOperands(), getReg(), getSubReg(), hasLiveCondCodeDef(), InvalidateKills(), InvalidateRegDef(), isDead(), llvm::TargetInstrInfoImpl::isDeadInstruction(), isDef(), isEarlyClobber(), isImplicit(), isKill(), llvm::isLeaMem(), isLiveInButUnusedBefore(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SystemZInstrInfo::isLoadFromStackSlot(), llvm::PIC16InstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::isMem(), isMemoryOp(), llvm::X86InstrInfo::isMoveInstr(), llvm::SystemZInstrInfo::isMoveInstr(), llvm::SPUInstrInfo::isMoveInstr(), llvm::SparcInstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::MSP430InstrInfo::isMoveInstr(), llvm::MipsInstrInfo::isMoveInstr(), llvm::ARMBaseInstrInfo::isMoveInstr(), llvm::AlphaInstrInfo::isMoveInstr(), isReadModWriteImplicitDef(), isReadModWriteImplicitKill(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::MachineInstr::isRegTiedToDefOperand(), llvm::MachineInstr::isRegTiedToUseOperand(), IsSafeAndProfitableToMove(), isSafeToClobberEFLAGS(), isSafeToDelete(), llvm::MachineInstr::isSafeToReMat(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SystemZInstrInfo::isStoreToStackSlot(), llvm::PIC16InstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), isTwoAddrUse(), isUndef(), isUse(), llvm::X86InstrInfo::isX86_64ExtendedReg(), LookForDuplicate(), llvm::TargetInstrInfoImpl::PredicateInstruction(), llvm::X86ATTAsmPrinter::PrintAsmOperand(), llvm::AsmPrinter::printInlineAsm(), llvm::X86IntelAsmPrinter::printOperand(), llvm::LiveIntervals::processImplicitDefs(), ReMaterialize(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::RegScavenger::scavengeRegister(), setImplicit(), setIsDead(), setIsDef(), setIsEarlyClobber(), setIsKill(), setIsUndef(), setIsUse(), setSubReg(), llvm::X86InstrInfo::unfoldMemoryOperand(), UpdateCPSRDef(), UpdateCPSRUse(), UpdateKills(), and VerifyLowRegs().

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

isImm - Tests if this is a MO_Immediate operand.

Definition at line 146 of file MachineOperand.h.

References MO_Immediate.

Referenced by llvm::X86InstrInfo::convertToThreeAddress(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::BlackfinRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::emitEpilogue(), llvm::SystemZRegisterInfo::emitEpilogue(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), getImm(), GetInstSizeWithDesc(), llvm::isLeaMem(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SystemZInstrInfo::isLoadFromStackSlot(), llvm::SPUInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::MipsInstrInfo::isLoadFromStackSlot(), llvm::BlackfinInstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::SPUInstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::MachineInstr::isRegTiedToDefOperand(), llvm::MachineInstr::isRegTiedToUseOperand(), llvm::isScale(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SystemZInstrInfo::isStoreToStackSlot(), llvm::SPUInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::MipsInstrInfo::isStoreToStackSlot(), llvm::BlackfinInstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), isZeroImm(), llvm::TargetInstrInfoImpl::PredicateInstruction(), llvm::X86ATTAsmPrinter::PrintAsmOperand(), llvm::X86ATTAsmPrinter::printLeaMemReference(), and setImm().

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

isFPImm - Tests if this is a MO_FPImmediate operand.

Definition at line 148 of file MachineOperand.h.

References MO_FPImmediate.

Referenced by getFPImm().

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

isMBB - Tests if this is a MO_MachineBasicBlock operand.

Definition at line 150 of file MachineOperand.h.

References MO_MachineBasicBlock.

Referenced by llvm::PPCInstrInfo::AnalyzeBranch(), GetInstSizeWithDesc(), getMBB(), llvm::TargetInstrInfoImpl::PredicateInstruction(), setMBB(), and llvm::SplitCriticalMachineEdge().

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

isFI - Tests if this is a MO_FrameIndex operand.

Definition at line 152 of file MachineOperand.h.

References MO_FrameIndex.

Referenced by ComputeReloadLoc(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::SystemZRegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::BlackfinRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), getIndex(), isCSRestore(), llvm::X86InstrInfo::isInvariantLoad(), llvm::SystemZInstrInfo::isInvariantLoad(), llvm::isLeaMem(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SystemZInstrInfo::isLoadFromStackSlot(), llvm::SPUInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::MipsInstrInfo::isLoadFromStackSlot(), llvm::BlackfinInstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::AlphaInstrInfo::isLoadFromStackSlot(), llvm::isMem(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SystemZInstrInfo::isStoreToStackSlot(), llvm::SPUInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::MipsInstrInfo::isStoreToStackSlot(), llvm::BlackfinInstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), llvm::AlphaInstrInfo::isStoreToStackSlot(), llvm::VirtRegMap::RemoveMachineInstrFromMaps(), and setIndex().

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

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

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

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

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

isMetadata - Tests if this is a MO_Metadata operand.

Definition at line 162 of file MachineOperand.h.

References MO_Metadata.

Referenced by setOffset().

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

getReg - Returns the register number.

Definition at line 169 of file MachineOperand.h.

References isReg().

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::addIntervalsForSpillsFast(), llvm::MachineInstr::addRegisterDead(), llvm::MachineInstr::addRegisterKilled(), AssignPhysToVirtReg(), llvm::ScheduleDAGInstrs::BuildSchedGraph(), llvm::Thumb1InstrInfo::canFoldMemoryOperand(), llvm::SPUInstrInfo::canFoldMemoryOperand(), llvm::PPCInstrInfo::canFoldMemoryOperand(), llvm::ARMBaseInstrInfo::canFoldMemoryOperand(), CanTurnIntoImplicitDef(), llvm::TargetInstrInfoImpl::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::ScheduleDAGInstrs::ComputeOperandLatency(), llvm::LiveIntervals::conflictsWithPhysRegDef(), llvm::LiveIntervals::conflictsWithPhysRegRef(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::ARMBaseInstrInfo::DefinesPredicate(), llvm::X86InstrInfo::determineREX(), llvm::ARMBaseRegisterInfo::eliminateCallFramePseudoInstr(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::BlackfinRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::SystemZTargetLowering::EmitInstrWithCustomInserter(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PIC16TargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::AlphaTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), encodeVFPRd(), encodeVFPRm(), encodeVFPRn(), FindFreeRegister(), llvm::MachineInstr::findRegisterDefOperandIdx(), llvm::MachineInstr::findRegisterUseOperandIdx(), llvm::Thumb1InstrInfo::foldMemoryOperandImpl(), llvm::SPUInstrInfo::foldMemoryOperandImpl(), llvm::SparcInstrInfo::foldMemoryOperandImpl(), llvm::PPCInstrInfo::foldMemoryOperandImpl(), llvm::MipsInstrInfo::foldMemoryOperandImpl(), llvm::ARMBaseInstrInfo::foldMemoryOperandImpl(), llvm::AlphaInstrInfo::foldMemoryOperandImpl(), FoldsStackSlotModRef(), llvm::RegScavenger::forward(), getFPReg(), llvm::getInstrPredicate(), getMemModRMByteSize(), llvm::LiveIntervals::getVNInfoSourceReg(), HandleVRSaveUpdate(), HashMachineInstr(), hasLiveCondCodeDef(), InvalidateKills(), InvalidateRegDef(), isCopyToReg(), isCSRestore(), llvm::TargetInstrInfoImpl::isDeadInstruction(), isIdenticalTo(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SystemZInstrInfo::isLoadFromStackSlot(), llvm::SPUInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::PIC16InstrInfo::isLoadFromStackSlot(), llvm::MipsInstrInfo::isLoadFromStackSlot(), llvm::BlackfinInstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::AlphaInstrInfo::isLoadFromStackSlot(), isMatchingDecrement(), isMatchingIncrement(), isMemoryOp(), llvm::XCoreInstrInfo::isMoveInstr(), llvm::X86InstrInfo::isMoveInstr(), llvm::SystemZInstrInfo::isMoveInstr(), llvm::SPUInstrInfo::isMoveInstr(), llvm::SparcInstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::PIC16InstrInfo::isMoveInstr(), llvm::MSP430InstrInfo::isMoveInstr(), llvm::MipsInstrInfo::isMoveInstr(), llvm::BlackfinInstrInfo::isMoveInstr(), llvm::ARMBaseInstrInfo::isMoveInstr(), llvm::AlphaInstrInfo::isMoveInstr(), isReadModWriteImplicitDef(), isReadModWriteImplicitKill(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::MachineInstr::isRegTiedToDefOperand(), llvm::MachineInstr::isRegTiedToUseOperand(), IsSafeAndProfitableToMove(), isSafeToClobberEFLAGS(), isSafeToDelete(), llvm::MachineInstr::isSafeToReMat(), isSourceDefinedByImplicitDef(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SystemZInstrInfo::isStoreToStackSlot(), llvm::SPUInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::PIC16InstrInfo::isStoreToStackSlot(), llvm::MipsInstrInfo::isStoreToStackSlot(), llvm::BlackfinInstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), llvm::AlphaInstrInfo::isStoreToStackSlot(), isTwoAddrUse(), llvm::X86InstrInfo::isX86_64ExtendedReg(), LookForDuplicate(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), print(), llvm::X86IntelAsmPrinter::printAsmMRegister(), llvm::X86ATTAsmPrinter::printAsmMRegister(), llvm::AsmPrinter::printImplicitDef(), llvm::X86IntelAsmPrinter::printLeaMemReference(), llvm::X86ATTAsmPrinter::printLeaMemReference(), llvm::X86ATTAsmPrinter::printMachineInstruction(), llvm::X86IntelAsmPrinter::printMemReference(), llvm::X86ATTAsmPrinter::printMemReference(), llvm::X86IntelAsmPrinter::printOp(), llvm::X86IntelAsmPrinter::printOperand(), llvm::X86ATTAsmPrinter::printOperand(), llvm::LiveIntervals::processImplicitDefs(), ReMaterialize(), llvm::ARMInstrInfo::reMaterialize(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), llvm::rewriteT2FrameIndex(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::PHIElimination::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::RegScavenger::scavengeRegister(), setReg(), llvm::X86InstrInfo::unfoldMemoryOperand(), UpdateCPSRDef(), UpdateCPSRUse(), UpdateKills(), and VerifyLowRegs().

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

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

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

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

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

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

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

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

Definition at line 209 of file MachineOperand.h.

References isReg().

Referenced by ChangeToRegister(), CreateReg(), llvm::RegScavenger::forward(), and print().

MachineOperand* llvm::MachineOperand::getNextOperandForReg (  )  const [inline]

getNextOperandForReg - Return the next MachineOperand in the function that uses or defines this register.

Definition at line 216 of file MachineOperand.h.

References isReg().

void MachineOperand::setReg ( unsigned  Reg  ) 

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

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

Definition at line 234 of file MachineOperand.h.

References isReg(), and Val.

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

Definition at line 239 of file MachineOperand.h.

References isReg(), and Val.

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

Definition at line 244 of file MachineOperand.h.

References isReg(), and Val.

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

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

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

Definition at line 259 of file MachineOperand.h.

References isReg(), and Val.

Referenced by llvm::LiveIntervals::processImplicitDefs().

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

Definition at line 264 of file MachineOperand.h.

References isReg(), and Val.

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

Definition at line 273 of file MachineOperand.h.

References isImm().

Referenced by llvm::X86InstrInfo::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::XCoreRegisterInfo::eliminateCallFramePseudoInstr(), llvm::X86RegisterInfo::eliminateCallFramePseudoInstr(), llvm::Thumb1RegisterInfo::eliminateCallFramePseudoInstr(), llvm::SparcRegisterInfo::eliminateCallFramePseudoInstr(), llvm::MSP430RegisterInfo::eliminateCallFramePseudoInstr(), llvm::ARMBaseRegisterInfo::eliminateCallFramePseudoInstr(), llvm::AlphaRegisterInfo::eliminateCallFramePseudoInstr(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::SystemZRegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::BlackfinRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::emitEpilogue(), llvm::SystemZRegisterInfo::emitEpilogue(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::SystemZTargetLowering::EmitInstrWithCustomInserter(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PIC16TargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::ARMBaseInstrInfo::foldMemoryOperandImpl(), llvm::getInstrPredicate(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), getLSMultipleTransferSize(), getMemoryOpOffset(), llvm::ARMBaseInstrInfo::getPredicate(), llvm::LiveIntervals::getVNInfoSourceReg(), HashMachineInstr(), isIdenticalTo(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SystemZInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::BlackfinInstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), isMatchingDecrement(), isMatchingIncrement(), llvm::SPUInstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::BlackfinInstrInfo::isMoveInstr(), llvm::ARMBaseInstrInfo::isPredicated(), llvm::MachineInstr::isRegTiedToDefOperand(), llvm::MachineInstr::isRegTiedToUseOperand(), llvm::isScale(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SystemZInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::BlackfinInstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), isZeroImm(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::X86IntelAsmPrinter::print_pcrel_imm(), llvm::X86ATTAsmPrinter::print_pcrel_imm(), llvm::X86ATTAsmPrinter::PrintAsmOperand(), llvm::AsmPrinter::printInlineAsm(), llvm::AsmPrinter::printLabel(), llvm::X86IntelAsmPrinter::printLeaMemReference(), llvm::X86ATTAsmPrinter::printLeaMemReference(), llvm::X86ATTAsmPrinter::printMachineInstruction(), llvm::X86IntelAsmPrinter::printOp(), llvm::X86ATTAsmPrinter::printOperand(), llvm::X86IntelAsmPrinter::printSSECC(), llvm::X86ATTAsmPrinter::printSSECC(), llvm::ARMInstrInfo::reMaterialize(), llvm::rewriteARMFrameIndex(), llvm::rewriteT2FrameIndex(), and llvm::X86InstrInfo::unfoldMemoryOperand().

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

Definition at line 278 of file MachineOperand.h.

References isFPImm().

Referenced by isIdenticalTo().

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

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

Definition at line 288 of file MachineOperand.h.

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

Referenced by ComputeReloadLoc(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::SystemZRegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::BlackfinRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), HashMachineInstr(), isIdenticalTo(), llvm::X86InstrInfo::isInvariantLoad(), llvm::SystemZInstrInfo::isInvariantLoad(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SystemZInstrInfo::isLoadFromStackSlot(), llvm::SPUInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::PIC16InstrInfo::isLoadFromStackSlot(), llvm::MipsInstrInfo::isLoadFromStackSlot(), llvm::BlackfinInstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::AlphaInstrInfo::isLoadFromStackSlot(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SystemZInstrInfo::isStoreToStackSlot(), llvm::SPUInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::PIC16InstrInfo::isStoreToStackSlot(), llvm::MipsInstrInfo::isStoreToStackSlot(), llvm::BlackfinInstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), llvm::AlphaInstrInfo::isStoreToStackSlot(), llvm::AsmPrinter::printDeclare(), llvm::X86IntelAsmPrinter::printOp(), llvm::X86ATTAsmPrinter::printSymbolOperand(), and llvm::VirtRegMap::RemoveMachineInstrFromMaps().

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

MDNode* llvm::MachineOperand::getMDNode (  )  const [inline]

Definition at line 299 of file MachineOperand.h.

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

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

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

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

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

Definition at line 329 of file MachineOperand.h.

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

Referenced by CreateCPI(), CreateFI(), and CreateJTI().

void llvm::MachineOperand::setMBB ( MachineBasicBlock *  MBB  )  [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.

Definition at line 154 of file MachineInstr.cpp.

References getFPImm(), getGlobal(), getImm(), getIndex(), getMBB(), getOffset(), getReg(), getSubReg(), getSymbolName(), getTargetFlags(), getType(), isDef(), llvm_unreachable, MO_ConstantPoolIndex, MO_ExternalSymbol, MO_FPImmediate, MO_FrameIndex, MO_GlobalAddress, MO_Immediate, MO_JumpTableIndex, MO_MachineBasicBlock, and MO_Register.

Referenced by llvm::MachineInstr::copyKillDeadInfo(), llvm::MachineInstr::isIdenticalTo(), and LookForDuplicate().

void MachineOperand::ChangeToImmediate ( int64_t  ImmVal  ) 

ChangeToImmediate - Replace this operand with a new immediate operand of the specified value. If an operand is known to be an immediate already, the setImm method should be used.

ChangeToImmediate - Replace this operand with a new immediate operand of the specified value. If an operand is known to be an immediate already, the setImm method should be used.

Definition at line 109 of file MachineInstr.cpp.

References getParent(), isReg(), and MO_Immediate.

Referenced by llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SystemZRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::SystemZRegisterInfo::emitEpilogue(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::rewriteARMFrameIndex(), and llvm::rewriteT2FrameIndex().

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

static MachineOperand llvm::MachineOperand::CreateImm ( int64_t  Val  )  [inline, static]

static MachineOperand llvm::MachineOperand::CreateFPImm ( const ConstantFP *  CFP  )  [inline, static]

Definition at line 370 of file MachineOperand.h.

References CFP, Contents, MO_FPImmediate, and Op.

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

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 
) [inline, static]

static MachineOperand llvm::MachineOperand::CreateMBB ( MachineBasicBlock *  MBB,
unsigned char  TargetFlags = 0 
) [inline, static]

static MachineOperand llvm::MachineOperand::CreateFI ( unsigned  Idx  )  [inline, static]

static MachineOperand llvm::MachineOperand::CreateCPI ( unsigned  Idx,
int  Offset,
unsigned char  TargetFlags = 0 
) [inline, static]

static MachineOperand llvm::MachineOperand::CreateJTI ( unsigned  Idx,
unsigned char  TargetFlags = 0 
) [inline, static]

static MachineOperand llvm::MachineOperand::CreateGA ( GlobalValue *  GV,
int64_t  Offset,
unsigned char  TargetFlags = 0 
) [inline, static]

Definition at line 421 of file MachineOperand.h.

References Contents, MO_GlobalAddress, OffsetedInfo, Op, setOffset(), and setTargetFlags().

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

static MachineOperand llvm::MachineOperand::CreateMDNode ( MDNode *  N,
int64_t  Offset,
unsigned char  TargetFlags = 0 
) [inline, static]

Definition at line 429 of file MachineOperand.h.

References Contents, MO_Metadata, OffsetedInfo, Op, setOffset(), and setTargetFlags().

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

static MachineOperand llvm::MachineOperand::CreateES ( const char *  SymName,
int64_t  Offset = 0,
unsigned char  TargetFlags = 0 
) [inline, static]


Friends And Related Function Documentation

friend class MachineInstr [friend]

Definition at line 446 of file MachineOperand.h.

friend class MachineRegisterInfo [friend]

Definition at line 447 of file MachineOperand.h.


Member Data Documentation

Definition at line 95 of file MachineOperand.h.

Referenced by ChangeToRegister(), print(), and setReg().

Definition at line 96 of file MachineOperand.h.

Referenced by CreateFPImm().

Definition at line 97 of file MachineOperand.h.

Definition at line 100 of file MachineOperand.h.

Definition at line 101 of file MachineOperand.h.

Definition at line 102 of file MachineOperand.h.

struct { ... } llvm::MachineOperand::Reg

Referenced by CreateReg().

Definition at line 109 of file MachineOperand.h.

Definition at line 110 of file MachineOperand.h.

Definition at line 111 of file MachineOperand.h.

Definition at line 112 of file MachineOperand.h.

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

Definition at line 114 of file MachineOperand.h.

Referenced by CreateES().

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

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


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