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
}

Public Member Functions

 MachineOperand (const MachineOperand &M)
 ~MachineOperand ()
MachineOperandType getType () const
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.
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 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 setIsEarlyClobber (bool Val=true)
int64_t getImm () const
const ConstantFP * getFPImm () const
MachineBasicBlock * getMBB () const
int getIndex () const
GlobalValue * getGlobal () 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)
const MachineOperand & operator= (const MachineOperand &MO)

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, unsigned SubReg=0, bool isEarlyClobber=false)
static MachineOperand CreateMBB (MachineBasicBlock *MBB)
static MachineOperand CreateFI (unsigned Idx)
static MachineOperand CreateCPI (unsigned Idx, int Offset)
static MachineOperand CreateJTI (unsigned Idx)
static MachineOperand CreateGA (GlobalValue *GV, int64_t Offset)
static MachineOperand CreateES (const char *SymName, int64_t Offset=0)

Friends

class MachineInstr
class MachineRegisterInfo


Detailed Description

MachineOperand class - Representation of each machine instruction operand.

Definition at line 33 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.

Definition at line 35 of file MachineOperand.h.


Constructor & Destructor Documentation

llvm::MachineOperand::MachineOperand ( const MachineOperand &  M  )  [inline]

Definition at line 110 of file MachineOperand.h.

llvm::MachineOperand::~MachineOperand (  )  [inline]

Definition at line 114 of file MachineOperand.h.


Member Function Documentation

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

getType - Returns the MachineOperandType for this operand.

Definition at line 118 of file MachineOperand.h.

Referenced by HashMachineInstr(), isIdenticalTo(), print(), llvm::X86IntelAsmPrinter::printOp(), and llvm::X86ATTAsmPrinter::printOperand().

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

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

Definition at line 123 of file MachineOperand.h.

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

print - Print the specified machine operand.

Definition at line 166 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 133 of file MachineOperand.h.

References MO_Register.

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::addIntervalsForSpillsFast(), llvm::MachineInstr::addOperand(), llvm::MachineInstr::addRegisterDead(), llvm::MachineInstr::addRegisterKilled(), ARMInstrAddOperand(), llvm::RegScavenger::backward(), llvm::ScheduleDAGInstrs::BuildSchedGraph(), ChangeToImmediate(), ChangeToRegister(), llvm::TargetInstrInfoImpl::CommuteChangesDestination(), llvm::TargetInstrInfoImpl::commuteInstruction(), llvm::LiveIntervals::conflictsWithPhysRegDef(), llvm::LiveIntervals::conflictsWithPhysRegRef(), llvm::ARMInstrInfo::convertToThreeAddress(), llvm::MachineInstr::copyKillDeadInfo(), llvm::ARMInstrInfo::DefinesPredicate(), llvm::X86InstrInfo::determineREX(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::MachineInstr::findRegisterDefOperandIdx(), llvm::MachineInstr::findRegisterUseOperandIdx(), llvm::SparcInstrInfo::foldMemoryOperandImpl(), llvm::MipsInstrInfo::foldMemoryOperandImpl(), llvm::RegScavenger::forward(), FuseInst(), getFPReg(), getNextOperandForReg(), llvm::MachineInstr::getNumExplicitOperands(), getReg(), getSubReg(), hasLiveCondCodeDef(), InvalidateKills(), InvalidateRegDef(), isDead(), isDef(), isEarlyClobber(), isImplicit(), isKill(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::PIC16InstrInfo::isLoadFromStackSlot(), llvm::ARMInstrInfo::isLoadFromStackSlot(), llvm::isMem(), isMemoryOp(), llvm::X86InstrInfo::isMoveInstr(), llvm::SPUInstrInfo::isMoveInstr(), llvm::SparcInstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::MipsInstrInfo::isMoveInstr(), llvm::IA64InstrInfo::isMoveInstr(), llvm::ARMInstrInfo::isMoveInstr(), llvm::AlphaInstrInfo::isMoveInstr(), isReadModWriteImplicitDef(), isReadModWriteImplicitKill(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::MachineInstr::isRegReDefinedByTwoAddr(), isSafeToClobberEFLAGS(), llvm::MachineInstr::isSafeToReMat(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::PIC16InstrInfo::isStoreToStackSlot(), llvm::ARMInstrInfo::isStoreToStackSlot(), isTwoAddrUse(), isUse(), llvm::X86InstrInfo::isX86_64ExtendedReg(), llvm::SPUInstrInfo::loadRegFromAddr(), llvm::SparcInstrInfo::loadRegFromAddr(), llvm::PPCInstrInfo::loadRegFromAddr(), llvm::MipsInstrInfo::loadRegFromAddr(), llvm::IA64InstrInfo::loadRegFromAddr(), llvm::AlphaInstrInfo::loadRegFromAddr(), llvm::TargetInstrInfoImpl::PredicateInstruction(), llvm::X86ATTAsmPrinter::PrintAsmOperand(), llvm::AsmPrinter::printInlineAsm(), llvm::X86IntelAsmPrinter::printOperand(), RedefinesSuperRegPart(), llvm::X86InstrInfo::reMaterialize(), ReMaterialize(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::RegScavenger::scavengeRegister(), setImplicit(), setIsDead(), setIsDef(), setIsEarlyClobber(), setIsKill(), setIsUse(), setSubReg(), llvm::SPUInstrInfo::storeRegToAddr(), llvm::SparcInstrInfo::storeRegToAddr(), llvm::PPCInstrInfo::storeRegToAddr(), llvm::MipsInstrInfo::storeRegToAddr(), llvm::IA64InstrInfo::storeRegToAddr(), llvm::AlphaInstrInfo::storeRegToAddr(), llvm::X86InstrInfo::unfoldMemoryOperand(), UpdateKills(), and X86InstrAddOperand().

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

isImm - Tests if this is a MO_Immediate operand.

Definition at line 135 of file MachineOperand.h.

References MO_Immediate.

Referenced by ARMInstrAddOperand(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::emitEpilogue(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), getImm(), GetInstSizeWithDesc(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SPUInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::MipsInstrInfo::isLoadFromStackSlot(), llvm::ARMInstrInfo::isLoadFromStackSlot(), llvm::isMem(), llvm::SPUInstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::isScale(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SPUInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::MipsInstrInfo::isStoreToStackSlot(), llvm::ARMInstrInfo::isStoreToStackSlot(), isZeroImm(), llvm::SPUInstrInfo::loadRegFromAddr(), llvm::SparcInstrInfo::loadRegFromAddr(), llvm::PPCInstrInfo::loadRegFromAddr(), llvm::MipsInstrInfo::loadRegFromAddr(), llvm::IA64InstrInfo::loadRegFromAddr(), llvm::TargetInstrInfoImpl::PredicateInstruction(), setImm(), llvm::SPUInstrInfo::storeRegToAddr(), llvm::SparcInstrInfo::storeRegToAddr(), llvm::PPCInstrInfo::storeRegToAddr(), llvm::MipsInstrInfo::storeRegToAddr(), llvm::IA64InstrInfo::storeRegToAddr(), and X86InstrAddOperand().

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

isFPImm - Tests if this is a MO_FPImmediate operand.

Definition at line 137 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 139 of file MachineOperand.h.

References MO_MachineBasicBlock.

Referenced by 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 141 of file MachineOperand.h.

References MO_FrameIndex.

Referenced by ARMInstrAddOperand(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::IA64RegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), getIndex(), isCSRestore(), llvm::X86InstrInfo::isInvariantLoad(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SPUInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::MipsInstrInfo::isLoadFromStackSlot(), llvm::ARMInstrInfo::isLoadFromStackSlot(), llvm::AlphaInstrInfo::isLoadFromStackSlot(), llvm::isMem(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SPUInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::MipsInstrInfo::isStoreToStackSlot(), llvm::ARMInstrInfo::isStoreToStackSlot(), llvm::AlphaInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::loadRegFromAddr(), llvm::VirtRegMap::RemoveMachineInstrFromMaps(), setIndex(), llvm::SparcInstrInfo::storeRegToAddr(), and X86InstrAddOperand().

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

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

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

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

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

getReg - Returns the register number.

Definition at line 156 of file MachineOperand.h.

References isReg().

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::addIntervalsForSpillsFast(), llvm::MachineInstr::addRegisterDead(), llvm::MachineInstr::addRegisterKilled(), ARMInstrAddOperand(), llvm::RegScavenger::backward(), llvm::ScheduleDAGInstrs::BuildSchedGraph(), llvm::SPUInstrInfo::canFoldMemoryOperand(), llvm::PPCInstrInfo::canFoldMemoryOperand(), llvm::ARMInstrInfo::canFoldMemoryOperand(), llvm::TargetInstrInfoImpl::CommuteChangesDestination(), llvm::TargetInstrInfoImpl::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::LiveIntervals::conflictsWithPhysRegDef(), llvm::LiveIntervals::conflictsWithPhysRegRef(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::ARMInstrInfo::convertToThreeAddress(), llvm::ARMInstrInfo::DefinesPredicate(), llvm::X86InstrInfo::determineREX(), llvm::ARMRegisterInfo::eliminateCallFramePseudoInstr(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PIC16TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::AlphaTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), encodeVFPRd(), encodeVFPRm(), encodeVFPRn(), llvm::MachineInstr::findRegisterDefOperandIdx(), llvm::MachineInstr::findRegisterUseOperandIdx(), llvm::SPUInstrInfo::foldMemoryOperandImpl(), llvm::SparcInstrInfo::foldMemoryOperandImpl(), llvm::PPCInstrInfo::foldMemoryOperandImpl(), llvm::MipsInstrInfo::foldMemoryOperandImpl(), llvm::ARMInstrInfo::foldMemoryOperandImpl(), llvm::AlphaInstrInfo::foldMemoryOperandImpl(), llvm::RegScavenger::forward(), getFPReg(), getInstrPredicate(), getMemModRMByteSize(), llvm::LiveIntervals::getVNInfoSourceReg(), HandleVRSaveUpdate(), HashMachineInstr(), hasLiveCondCodeDef(), InvalidateKills(), InvalidateRegDef(), isCSRestore(), isIdenticalTo(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SPUInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::PIC16InstrInfo::isLoadFromStackSlot(), llvm::MipsInstrInfo::isLoadFromStackSlot(), llvm::ARMInstrInfo::isLoadFromStackSlot(), llvm::AlphaInstrInfo::isLoadFromStackSlot(), isMatchingDecrement(), isMatchingIncrement(), isMemoryOp(), llvm::XCoreInstrInfo::isMoveInstr(), llvm::X86InstrInfo::isMoveInstr(), llvm::SPUInstrInfo::isMoveInstr(), llvm::SparcInstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::PIC16InstrInfo::isMoveInstr(), llvm::MipsInstrInfo::isMoveInstr(), llvm::IA64InstrInfo::isMoveInstr(), llvm::ARMInstrInfo::isMoveInstr(), llvm::AlphaInstrInfo::isMoveInstr(), isReadModWriteImplicitDef(), isReadModWriteImplicitKill(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), isSafeToClobberEFLAGS(), llvm::MachineInstr::isSafeToReMat(), isSourceDefinedByImplicitDef(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SPUInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::PIC16InstrInfo::isStoreToStackSlot(), llvm::MipsInstrInfo::isStoreToStackSlot(), llvm::ARMInstrInfo::isStoreToStackSlot(), llvm::AlphaInstrInfo::isStoreToStackSlot(), isTwoAddrUse(), llvm::X86InstrInfo::isX86_64ExtendedReg(), llvm::SPUInstrInfo::loadRegFromAddr(), llvm::SparcInstrInfo::loadRegFromAddr(), llvm::PPCInstrInfo::loadRegFromAddr(), llvm::MipsInstrInfo::loadRegFromAddr(), llvm::IA64InstrInfo::loadRegFromAddr(), llvm::AlphaInstrInfo::loadRegFromAddr(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), mergeBaseUpdateLoadStore(), mergeBaseUpdateLSMultiple(), print(), llvm::X86IntelAsmPrinter::printAsmMRegister(), llvm::X86ATTAsmPrinter::printAsmMRegister(), llvm::AsmPrinter::printImplicitDef(), llvm::X86IntelAsmPrinter::printMemReference(), llvm::X86ATTAsmPrinter::printMemReference(), llvm::X86IntelAsmPrinter::printOp(), llvm::X86IntelAsmPrinter::printOperand(), llvm::X86ATTAsmPrinter::printOperand(), RedefinesSuperRegPart(), ReMaterialize(), llvm::ARMInstrInfo::reMaterialize(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::RegScavenger::scavengeRegister(), setReg(), llvm::SPUInstrInfo::storeRegToAddr(), llvm::SparcInstrInfo::storeRegToAddr(), llvm::PPCInstrInfo::storeRegToAddr(), llvm::MipsInstrInfo::storeRegToAddr(), llvm::IA64InstrInfo::storeRegToAddr(), llvm::AlphaInstrInfo::storeRegToAddr(), llvm::X86InstrInfo::unfoldMemoryOperand(), UpdateKills(), and X86InstrAddOperand().

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::isEarlyClobber (  )  const [inline]

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

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

Definition at line 198 of file MachineOperand.h.

References isReg().

void MachineOperand::setReg ( unsigned  Reg  ) 

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

Definition at line 211 of file MachineOperand.h.

References isReg().

Referenced by llvm::X86InstrInfo::reMaterialize().

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

Definition at line 216 of file MachineOperand.h.

References isReg(), and Val.

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

Definition at line 221 of file MachineOperand.h.

References isReg(), and Val.

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

Definition at line 226 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::setIsEarlyClobber ( bool  Val = true  )  [inline]

Definition at line 241 of file MachineOperand.h.

References isReg(), and Val.

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

Definition at line 250 of file MachineOperand.h.

References isImm().

Referenced by ARMInstrAddOperand(), llvm::X86InstrInfo::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::ARMInstrInfo::convertToThreeAddress(), llvm::XCoreRegisterInfo::eliminateCallFramePseudoInstr(), llvm::X86RegisterInfo::eliminateCallFramePseudoInstr(), llvm::SparcRegisterInfo::eliminateCallFramePseudoInstr(), llvm::IA64RegisterInfo::eliminateCallFramePseudoInstr(), llvm::ARMRegisterInfo::eliminateCallFramePseudoInstr(), llvm::AlphaRegisterInfo::eliminateCallFramePseudoInstr(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::emitEpilogue(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PIC16TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::ARMInstrInfo::foldMemoryOperandImpl(), getInstrPredicate(), llvm::ARMInstrInfo::GetInstSizeInBytes(), getLSMultipleTransferSize(), llvm::ARMInstrInfo::getPredicate(), llvm::LiveIntervals::getVNInfoSourceReg(), HashMachineInstr(), isIdenticalTo(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::ARMInstrInfo::isLoadFromStackSlot(), isMatchingDecrement(), isMatchingIncrement(), llvm::SPUInstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::ARMInstrInfo::isPredicated(), llvm::isScale(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::ARMInstrInfo::isStoreToStackSlot(), isZeroImm(), llvm::SPUInstrInfo::loadRegFromAddr(), llvm::SparcInstrInfo::loadRegFromAddr(), llvm::PPCInstrInfo::loadRegFromAddr(), llvm::MipsInstrInfo::loadRegFromAddr(), llvm::IA64InstrInfo::loadRegFromAddr(), llvm::AlphaInstrInfo::loadRegFromAddr(), llvm::PPCRegisterInfo::lowerCRSpilling(), mergeBaseUpdateLoadStore(), mergeBaseUpdateLSMultiple(), print(), llvm::AsmPrinter::printInlineAsm(), llvm::AsmPrinter::printLabel(), llvm::X86IntelAsmPrinter::printMemReference(), llvm::X86ATTAsmPrinter::printMemReference(), llvm::X86IntelAsmPrinter::printOp(), llvm::X86ATTAsmPrinter::printOperand(), llvm::X86IntelAsmPrinter::printSSECC(), llvm::X86ATTAsmPrinter::printSSECC(), llvm::ARMInstrInfo::reMaterialize(), llvm::SPUInstrInfo::storeRegToAddr(), llvm::SparcInstrInfo::storeRegToAddr(), llvm::PPCInstrInfo::storeRegToAddr(), llvm::MipsInstrInfo::storeRegToAddr(), llvm::IA64InstrInfo::storeRegToAddr(), llvm::AlphaInstrInfo::storeRegToAddr(), llvm::X86InstrInfo::unfoldMemoryOperand(), and X86InstrAddOperand().

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

Definition at line 255 of file MachineOperand.h.

References isFPImm().

Referenced by isIdenticalTo(), and print().

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

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

Definition at line 265 of file MachineOperand.h.

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

Referenced by ARMInstrAddOperand(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::IA64RegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMInstrInfo::GetInstSizeInBytes(), HashMachineInstr(), isIdenticalTo(), llvm::X86InstrInfo::isInvariantLoad(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SPUInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::PIC16InstrInfo::isLoadFromStackSlot(), llvm::MipsInstrInfo::isLoadFromStackSlot(), llvm::ARMInstrInfo::isLoadFromStackSlot(), llvm::AlphaInstrInfo::isLoadFromStackSlot(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SPUInstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::PIC16InstrInfo::isStoreToStackSlot(), llvm::MipsInstrInfo::isStoreToStackSlot(), llvm::ARMInstrInfo::isStoreToStackSlot(), llvm::AlphaInstrInfo::isStoreToStackSlot(), llvm::SPUInstrInfo::loadRegFromAddr(), llvm::SparcInstrInfo::loadRegFromAddr(), llvm::PPCInstrInfo::loadRegFromAddr(), llvm::MipsInstrInfo::loadRegFromAddr(), llvm::IA64InstrInfo::loadRegFromAddr(), print(), llvm::AsmPrinter::printDeclare(), llvm::X86IntelAsmPrinter::printOp(), llvm::X86ATTAsmPrinter::printOperand(), llvm::VirtRegMap::RemoveMachineInstrFromMaps(), llvm::SPUInstrInfo::storeRegToAddr(), llvm::SparcInstrInfo::storeRegToAddr(), llvm::PPCInstrInfo::storeRegToAddr(), llvm::MipsInstrInfo::storeRegToAddr(), llvm::IA64InstrInfo::storeRegToAddr(), and X86InstrAddOperand().

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

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

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

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

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

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

Referenced by llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), and llvm::X86InstrInfo::foldMemoryOperandImpl().

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

ChangeToRegister - Replace this operand with a new register operand of the specified value. If an operand is known to be an register already, the setReg method should be used.

ChangeToRegister - Replace this operand with a new register operand of the specified value. If an operand is known to be an register already, the setReg method should be used.

Definition at line 106 of file MachineInstr.cpp.

References llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), getParent(), llvm::MachineFunction::getRegInfo(), isEarlyClobber(), isReg(), MBB, MF, MI, MO_Register, and setReg().

Referenced by llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::IA64RegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), and llvm::X86InstrInfo::unfoldMemoryOperand().

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

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

Definition at line 342 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,
unsigned  SubReg = 0,
bool  isEarlyClobber = false 
) [inline, static]

static MachineOperand llvm::MachineOperand::CreateMBB ( MachineBasicBlock *  MBB  )  [inline, static]

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

static MachineOperand llvm::MachineOperand::CreateCPI ( unsigned  Idx,
int  Offset 
) [inline, static]

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

Definition at line 380 of file MachineOperand.h.

References MO_JumpTableIndex, Op, and setIndex().

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

static MachineOperand llvm::MachineOperand::CreateGA ( GlobalValue *  GV,
int64_t  Offset 
) [inline, static]

Definition at line 385 of file MachineOperand.h.

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

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

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

const MachineOperand& llvm::MachineOperand::operator= ( const MachineOperand &  MO  )  [inline]

Definition at line 397 of file MachineOperand.h.

References Contents, IsDead, IsDef, IsEarlyClobber, IsImp, IsKill, OpKind, ParentMI, and SubReg.


Friends And Related Function Documentation

friend class MachineInstr [friend]

Definition at line 410 of file MachineOperand.h.

friend class MachineRegisterInfo [friend]

Definition at line 411 of file MachineOperand.h.


Member Data Documentation

Definition at line 86 of file MachineOperand.h.

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

Definition at line 87 of file MachineOperand.h.

Referenced by CreateFPImm().

Definition at line 88 of file MachineOperand.h.

Definition at line 91 of file MachineOperand.h.

Definition at line 92 of file MachineOperand.h.

Definition at line 93 of file MachineOperand.h.

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

Referenced by CreateReg().

Definition at line 100 of file MachineOperand.h.

Definition at line 101 of file MachineOperand.h.

Definition at line 102 of file MachineOperand.h.

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

Definition at line 104 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(), and CreateGA().


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