LLVM API Documentation

llvm::MachineInstr Class Reference

#include <MachineInstr.h>

Inheritance diagram for llvm::MachineInstr:
[legend]
Collaboration diagram for llvm::MachineInstr:
[legend]

List of all members.

Public Member Functions

const MachineBasicBlock * getParent () const
MachineBasicBlock * getParent ()
const DebugLoc getDebugLoc () const
const TargetInstrDesc & getDesc () const
int getOpcode () const
unsigned getNumOperands () const
const MachineOperand & getOperand (unsigned i) const
MachineOperand & getOperand (unsigned i)
unsigned getNumExplicitOperands () const
std::list< MachineMemOperand >
::iterator 
memoperands_begin ()
 Access to memory operands of the instruction.
std::list< MachineMemOperand >
::iterator 
memoperands_end ()
std::list< MachineMemOperand >
::const_iterator 
memoperands_begin () const
std::list< MachineMemOperand >
::const_iterator 
memoperands_end () const
bool memoperands_empty () const
bool hasOneMemOperand () const
bool isIdenticalTo (const MachineInstr *Other) const
MachineInstr * removeFromParent ()
void eraseFromParent ()
bool isLabel () const
bool isDebugLabel () const
bool readsRegister (unsigned Reg, const TargetRegisterInfo *TRI=NULL) const
bool killsRegister (unsigned Reg, const TargetRegisterInfo *TRI=NULL) const
bool modifiesRegister (unsigned Reg, const TargetRegisterInfo *TRI=NULL) const
bool registerDefIsDead (unsigned Reg, const TargetRegisterInfo *TRI=NULL) const
int findRegisterUseOperandIdx (unsigned Reg, bool isKill=false, const TargetRegisterInfo *TRI=NULL) const
MachineOperand * findRegisterUseOperand (unsigned Reg, bool isKill=false, const TargetRegisterInfo *TRI=NULL)
int findRegisterDefOperandIdx (unsigned Reg, bool isDead=false, const TargetRegisterInfo *TRI=NULL) const
MachineOperand * findRegisterDefOperand (unsigned Reg, bool isDead=false, const TargetRegisterInfo *TRI=NULL)
int findFirstPredOperandIdx () const
bool isRegReDefinedByTwoAddr (unsigned DefIdx) const
void copyKillDeadInfo (const MachineInstr *MI)
void copyPredicates (const MachineInstr *MI)
 copyPredicates - Copies predicate operand(s) from MI.
bool addRegisterKilled (unsigned IncomingReg, const TargetRegisterInfo *RegInfo, bool AddIfNotFound=false)
bool addRegisterDead (unsigned IncomingReg, const TargetRegisterInfo *RegInfo, bool AddIfNotFound=false)
bool isSafeToMove (const TargetInstrInfo *TII, bool &SawStore) const
bool isSafeToReMat (const TargetInstrInfo *TII, unsigned DstReg) const
bool hasVolatileMemoryRef () const
void print (std::ostream *OS, const TargetMachine *TM) const
void print (std::ostream &OS, const TargetMachine *TM=0) const
void print (std::ostream *OS) const
void print (raw_ostream *OS, const TargetMachine *TM) const
void print (raw_ostream &OS, const TargetMachine *TM=0) const
void print (raw_ostream *OS) const
void dump () const
void addOperand (const MachineOperand &Op)
void setDesc (const TargetInstrDesc &tid)
void setDebugLoc (const DebugLoc dl)
void RemoveOperand (unsigned i)
void addMemOperand (MachineFunction &MF, const MachineMemOperand &MO)
void clearMemOperands (MachineFunction &MF)
 clearMemOperands - Erase all of this MachineInstr's MachineMemOperands.

Friends

struct ilist_traits< MachineInstr >
struct ilist_traits< MachineBasicBlock >
struct ilist_sentinel_traits< MachineInstr >
class MachineFunction


Detailed Description

MachineInstr - Representation of each machine instruction.

Definition at line 39 of file MachineInstr.h.


Member Function Documentation

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

Definition at line 103 of file MachineInstr.h.

Referenced by llvm::addFrameReference(), llvm::LiveIntervals::addIntervalsForSpillsFast(), llvm::LiveIntervals::addLiveRangeToEndOfBlock(), llvm::MachineInstrBuilder::addMemOperand(), llvm::ScheduleDAGInstrs::BuildSchedGraph(), llvm::MachineOperand::ChangeToRegister(), llvm::X86InstrInfo::commuteInstruction(), llvm::TargetInstrInfoImpl::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::ARMInstrInfo::convertToThreeAddress(), llvm::MachineDominatorTree::dominates(), 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(), eraseFromParent(), getConflictWeight(), llvm::PPCInstrInfo::GetInstSizeInBytes(), llvm::ARMInstrInfo::GetInstSizeInBytes(), GetInstSizeWithDesc(), llvm::LiveVariables::HandleVirtRegUse(), HandleVRSaveUpdate(), llvm::XCoreInstrInfo::isInvariantLoad(), llvm::X86InstrInfo::isInvariantLoad(), isLiveInButUnusedBefore(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), MakeM0Inst(), precedes(), llvm::MachineOperand::print(), llvm::AsmPrinter::PrintSpecial(), removeFromParent(), RemoveVRSaveCode(), llvm::LiveVariables::runOnMachineFunction(), and llvm::MachineOperand::setReg().

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

Definition at line 104 of file MachineInstr.h.

const DebugLoc llvm::MachineInstr::getDebugLoc (  )  const [inline]

getDebugLoc - Returns the debug location id of this MachineInstr.

Definition at line 108 of file MachineInstr.h.

Referenced by llvm::TargetInstrInfoImpl::commuteInstruction(), FuseInst(), FuseTwoAddrInst(), and llvm::X86InstrInfo::unfoldMemoryOperand().

const TargetInstrDesc& llvm::MachineInstr::getDesc (  )  const [inline]

int llvm::MachineInstr::getOpcode (  )  const [inline]

getOpcode - Returns the opcode of this MachineInstr.

Definition at line 116 of file MachineInstr.h.

References llvm::TargetInstrDesc::Opcode.

Referenced by llvm::XCoreInstrInfo::AnalyzeBranch(), llvm::SPUInstrInfo::AnalyzeBranch(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::MipsInstrInfo::AnalyzeBranch(), llvm::ARMInstrInfo::AnalyzeBranch(), llvm::AlphaInstrInfo::AnalyzeBranch(), llvm::XCoreInstrInfo::BlockHasNoFallThrough(), llvm::X86InstrInfo::BlockHasNoFallThrough(), llvm::PPCInstrInfo::BlockHasNoFallThrough(), llvm::MipsInstrInfo::BlockHasNoFallThrough(), llvm::ARMInstrInfo::BlockHasNoFallThrough(), llvm::AlphaInstrInfo::BlockHasNoFallThrough(), llvm::X86InstrInfo::canFoldMemoryOperand(), llvm::SPUInstrInfo::canFoldMemoryOperand(), llvm::PPCInstrInfo::canFoldMemoryOperand(), llvm::ARMInstrInfo::canFoldMemoryOperand(), 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::SPURegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::AlphaTargetLowering::EmitInstrWithCustomInserter(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::SPUInstrInfo::foldMemoryOperandImpl(), llvm::SparcInstrInfo::foldMemoryOperandImpl(), llvm::PPCInstrInfo::foldMemoryOperandImpl(), llvm::MipsInstrInfo::foldMemoryOperandImpl(), llvm::ARMInstrInfo::foldMemoryOperandImpl(), llvm::AlphaInstrInfo::foldMemoryOperandImpl(), llvm::RegScavenger::forward(), llvm::PPCInstrInfo::GetInstSizeInBytes(), llvm::ARMInstrInfo::GetInstSizeInBytes(), getLSMultipleTransferSize(), llvm::LiveIntervals::getVNInfoSourceReg(), HashMachineInstr(), isBrAnalysisUnpredicatedTerminator(), isCondBranch(), isCSRestore(), isDebugLabel(), isIdenticalTo(), llvm::XCoreInstrInfo::isInvariantLoad(), isLabel(), 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(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), 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(), isUncondBranch(), mergeBaseUpdateLoadStore(), mergeBaseUpdateLSMultiple(), llvm::ARMInstrInfo::PredicateInstruction(), regIsPICBase(), llvm::X86InstrInfo::reMaterialize(), llvm::ARMInstrInfo::reMaterialize(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::LiveIntervals::spillPhysRegAroundRegDefsUses(), and llvm::X86InstrInfo::unfoldMemoryOperand().

unsigned llvm::MachineInstr::getNumOperands (  )  const [inline]

Access to explicit operands of the instruction.

Definition at line 120 of file MachineInstr.h.

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::addIntervalsForSpillsFast(), addRegisterDead(), addRegisterKilled(), llvm::MipsInstrInfo::AnalyzeBranch(), llvm::RegScavenger::backward(), llvm::ScheduleDAGInstrs::BuildSchedGraph(), llvm::LiveIntervals::conflictsWithPhysRegDef(), llvm::LiveIntervals::conflictsWithPhysRegRef(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::ARMInstrInfo::convertToThreeAddress(), copyKillDeadInfo(), copyPredicates(), llvm::ARMInstrInfo::DefinesPredicate(), 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(), findFirstPredOperandIdx(), findRegisterDefOperandIdx(), findRegisterUseOperandIdx(), llvm::RegScavenger::forward(), FuseInst(), FuseTwoAddrInst(), getLSMultipleTransferSize(), getNumExplicitOperands(), getOperand(), HashMachineInstr(), hasLiveCondCodeDef(), InvalidateKills(), InvalidateRegDef(), isIdenticalTo(), llvm::X86InstrInfo::isInvariantLoad(), llvm::isMem(), llvm::X86InstrInfo::isMoveInstr(), llvm::SPUInstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::IA64InstrInfo::isMoveInstr(), llvm::AlphaInstrInfo::isMoveInstr(), isReadModWriteImplicitDef(), isReadModWriteImplicitKill(), isSafeToReMat(), isSourceDefinedByImplicitDef(), mergeBaseUpdateLSMultiple(), llvm::TargetInstrInfoImpl::PredicateInstruction(), print(), llvm::AsmPrinter::printInlineAsm(), RedefinesSuperRegPart(), ReMaterialize(), llvm::VirtRegMap::RemoveMachineInstrFromMaps(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::X86InstrInfo::unfoldMemoryOperand(), and UpdateKills().

const MachineOperand& llvm::MachineInstr::getOperand ( unsigned  i  )  const [inline]

Definition at line 122 of file MachineInstr.h.

References getNumOperands().

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::addIntervalsForSpillsFast(), addRegisterDead(), addRegisterKilled(), llvm::XCoreInstrInfo::AnalyzeBranch(), llvm::SPUInstrInfo::AnalyzeBranch(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::MipsInstrInfo::AnalyzeBranch(), llvm::ARMInstrInfo::AnalyzeBranch(), llvm::AlphaInstrInfo::AnalyzeBranch(), llvm::RegScavenger::backward(), llvm::ScheduleDAGInstrs::BuildSchedGraph(), llvm::SPUInstrInfo::canFoldMemoryOperand(), llvm::PPCInstrInfo::canFoldMemoryOperand(), llvm::ARMInstrInfo::canFoldMemoryOperand(), llvm::TargetInstrInfoImpl::CommuteChangesDestination(), llvm::X86InstrInfo::commuteInstruction(), llvm::TargetInstrInfoImpl::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::LiveIntervals::conflictsWithPhysRegDef(), llvm::LiveIntervals::conflictsWithPhysRegRef(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::ARMInstrInfo::convertToThreeAddress(), copyKillDeadInfo(), copyPredicates(), llvm::ARMInstrInfo::DefinesPredicate(), llvm::X86InstrInfo::determineREX(), 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::IA64RegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::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(), llvm::X86RegisterInfo::emitPrologue(), emitSPUpdate(), encodeVFPRd(), encodeVFPRm(), encodeVFPRn(), FilterFoldedOps(), findRegisterDefOperand(), findRegisterDefOperandIdx(), findRegisterUseOperand(), findRegisterUseOperandIdx(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::SPUInstrInfo::foldMemoryOperandImpl(), llvm::SparcInstrInfo::foldMemoryOperandImpl(), llvm::PPCInstrInfo::foldMemoryOperandImpl(), llvm::MipsInstrInfo::foldMemoryOperandImpl(), llvm::ARMInstrInfo::foldMemoryOperandImpl(), llvm::AlphaInstrInfo::foldMemoryOperandImpl(), llvm::RegScavenger::forward(), FuseInst(), FuseTwoAddrInst(), getInstrPredicate(), llvm::PPCInstrInfo::GetInstSizeInBytes(), llvm::ARMInstrInfo::GetInstSizeInBytes(), GetInstSizeWithDesc(), getLSMultipleTransferSize(), getMemModRMByteSize(), getNumExplicitOperands(), llvm::ARMInstrInfo::getPredicate(), llvm::LiveIntervals::getVNInfoSourceReg(), HandleVRSaveUpdate(), HashMachineInstr(), hasLiveCondCodeDef(), InvalidateKills(), InvalidateRegDef(), isCSRestore(), isIdenticalTo(), llvm::XCoreInstrInfo::isInvariantLoad(), 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(), isMatchingDecrement(), isMatchingIncrement(), llvm::isMem(), 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(), llvm::ARMInstrInfo::isPredicated(), isReadModWriteImplicitDef(), isReadModWriteImplicitKill(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), isRegReDefinedByTwoAddr(), 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::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), mergeBaseUpdateLoadStore(), mergeBaseUpdateLSMultiple(), llvm::TargetInstrInfoImpl::PredicateInstruction(), llvm::ARMInstrInfo::PredicateInstruction(), print(), llvm::X86IntelAsmPrinter::PrintAsmOperand(), llvm::X86ATTAsmPrinter::PrintAsmOperand(), llvm::AsmPrinter::printDeclare(), llvm::AsmPrinter::printImplicitDef(), llvm::AsmPrinter::printInlineAsm(), llvm::AsmPrinter::printLabel(), llvm::X86IntelAsmPrinter::printMemReference(), llvm::X86ATTAsmPrinter::printMemReference(), llvm::X86IntelAsmPrinter::printOperand(), llvm::X86ATTAsmPrinter::printOperand(), llvm::X86IntelAsmPrinter::printSSECC(), llvm::X86ATTAsmPrinter::printSSECC(), PropagateDeadness(), RedefinesSuperRegPart(), llvm::X86InstrInfo::reMaterialize(), ReMaterialize(), llvm::TargetInstrInfoImpl::reMaterialize(), llvm::ARMInstrInfo::reMaterialize(), llvm::VirtRegMap::RemoveMachineInstrFromMaps(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::X86InstrInfo::unfoldMemoryOperand(), and UpdateKills().

MachineOperand& llvm::MachineInstr::getOperand ( unsigned  i  )  [inline]

Definition at line 126 of file MachineInstr.h.

References getNumOperands().

unsigned MachineInstr::getNumExplicitOperands (  )  const

getNumExplicitOperands - Returns the number of non-implicit operands.

Definition at line 605 of file MachineInstr.cpp.

References getNumOperands(), llvm::TargetInstrDesc::getNumOperands(), getOperand(), llvm::MachineOperand::isImplicit(), llvm::MachineOperand::isReg(), and llvm::TargetInstrDesc::isVariadic().

std::list<MachineMemOperand>::iterator llvm::MachineInstr::memoperands_begin (  )  [inline]

std::list<MachineMemOperand>::iterator llvm::MachineInstr::memoperands_end (  )  [inline]

std::list<MachineMemOperand>::const_iterator llvm::MachineInstr::memoperands_begin (  )  const [inline]

Definition at line 140 of file MachineInstr.h.

std::list<MachineMemOperand>::const_iterator llvm::MachineInstr::memoperands_end (  )  const [inline]

Definition at line 142 of file MachineInstr.h.

bool llvm::MachineInstr::memoperands_empty (  )  const [inline]

Definition at line 144 of file MachineInstr.h.

Referenced by hasOneMemOperand(), hasVolatileMemoryRef(), and print().

bool llvm::MachineInstr::hasOneMemOperand (  )  const [inline]

hasOneMemOperand - Return true if this instruction has exactly one MachineMemOperand.

Definition at line 148 of file MachineInstr.h.

References memoperands_begin(), memoperands_empty(), memoperands_end(), and llvm::next().

Referenced by llvm::ScheduleDAGInstrs::BuildSchedGraph(), llvm::X86InstrInfo::foldMemoryOperandImpl(), and getUnderlyingObjectForInstr().

bool llvm::MachineInstr::isIdenticalTo ( const MachineInstr *  Other  )  const [inline]

isIdenticalTo - Return true if this instruction is identical to (same opcode and same operands as) the specified instruction.

Definition at line 155 of file MachineInstr.h.

References getNumOperands(), getOpcode(), getOperand(), and llvm::MachineOperand::isIdenticalTo().

MachineInstr * MachineInstr::removeFromParent (  ) 

removeFromParent - This method unlinks 'this' from the containing basic block, and returns it, but does not delete it.

removeFromParent - This method unlinks 'this' from the containing basic block, and returns it, but does not delete it.

Definition at line 579 of file MachineInstr.cpp.

References getParent(), and llvm::MachineBasicBlock::remove().

void MachineInstr::eraseFromParent (  ) 

eraseFromParent - This method unlinks 'this' from the containing basic block and deletes it.

eraseFromParent - This method unlinks 'this' from the containing basic block, and deletes it.

Definition at line 588 of file MachineInstr.cpp.

References llvm::MachineBasicBlock::erase(), and getParent().

Referenced by llvm::XCoreInstrInfo::AnalyzeBranch(), llvm::SPUInstrInfo::AnalyzeBranch(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::MipsInstrInfo::AnalyzeBranch(), llvm::ARMInstrInfo::AnalyzeBranch(), llvm::AlphaInstrInfo::AnalyzeBranch(), CleanupConstantGlobalUsers(), HandleVRSaveUpdate(), and RemoveVRSaveCode().

bool MachineInstr::isLabel (  )  const

bool MachineInstr::isDebugLabel (  )  const

isDebugLabel - Returns true if the MachineInstr represents a debug label.

Definition at line 629 of file MachineInstr.cpp.

References llvm::TargetInstrInfo::DBG_LABEL, and getOpcode().

bool llvm::MachineInstr::readsRegister ( unsigned  Reg,
const TargetRegisterInfo *  TRI = NULL 
) const [inline]

readsRegister - Return true if the MachineInstr reads the specified register. If TargetRegisterInfo is passed, then it also checks if there is a read of a super-register.

Definition at line 184 of file MachineInstr.h.

References findRegisterUseOperandIdx(), and TRI.

Referenced by llvm::ARMInstrInfo::convertToThreeAddress(), and llvm::LiveVariables::runOnMachineFunction().

bool llvm::MachineInstr::killsRegister ( unsigned  Reg,
const TargetRegisterInfo *  TRI = NULL 
) const [inline]

killsRegister - Return true if the MachineInstr kills the specified register. If TargetRegisterInfo is passed, then it also checks if there is a kill of a super-register.

Definition at line 191 of file MachineInstr.h.

References findRegisterUseOperandIdx(), and TRI.

Referenced by interferes().

bool llvm::MachineInstr::modifiesRegister ( unsigned  Reg,
const TargetRegisterInfo *  TRI = NULL 
) const [inline]

modifiesRegister - Return true if the MachineInstr modifies the specified register. If TargetRegisterInfo is passed, then it also checks if there is a def of a super-register.

Definition at line 198 of file MachineInstr.h.

References findRegisterDefOperandIdx(), and TRI.

bool llvm::MachineInstr::registerDefIsDead ( unsigned  Reg,
const TargetRegisterInfo *  TRI = NULL 
) const [inline]

registerDefIsDead - Returns true if the register is dead in this machine instruction. If TargetRegisterInfo is passed, then it also checks if there is a dead def of a super-register.

Definition at line 206 of file MachineInstr.h.

References findRegisterDefOperandIdx(), and TRI.

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::ScheduleDAGInstrs::BuildSchedGraph(), and llvm::SimpleRegisterCoalescing::runOnMachineFunction().

int MachineInstr::findRegisterUseOperandIdx ( unsigned  Reg,
bool  isKill = false,
const TargetRegisterInfo *  TRI = NULL 
) const

findRegisterUseOperandIdx() - Returns the operand index that is a use of the specific register or -1 if it is not found. It further tightening the search criteria to a use that kills the register if isKill is true.

findRegisterUseOperandIdx() - Returns the MachineOperand that is a use of the specific register or -1 if it is not found. It further tightening the search criteria to a use that kills the register if isKill is true.

Definition at line 636 of file MachineInstr.cpp.

References getNumOperands(), getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isKill(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::TargetRegisterInfo::isSubRegister(), and llvm::MachineOperand::isUse().

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::ScheduleDAGInstrs::BuildSchedGraph(), findRegisterUseOperand(), killsRegister(), and readsRegister().

MachineOperand* llvm::MachineInstr::findRegisterUseOperand ( unsigned  Reg,
bool  isKill = false,
const TargetRegisterInfo *  TRI = NULL 
) [inline]

findRegisterUseOperand - Wrapper for findRegisterUseOperandIdx, it returns a pointer to the MachineOperand rather than an index.

Definition at line 219 of file MachineInstr.h.

References findRegisterUseOperandIdx(), getOperand(), Idx, and TRI.

int MachineInstr::findRegisterDefOperandIdx ( unsigned  Reg,
bool  isDead = false,
const TargetRegisterInfo *  TRI = NULL 
) const

findRegisterDefOperandIdx() - Returns the operand index that is a def of the specified register or -1 if it is not found. If isDead is true, defs that are not dead are skipped. If TargetRegisterInfo is non-null, then it also checks if there is a def of a super-register.

findRegisterDefOperandIdx() - Returns the operand index that is a def of the specified register or -1 if it is not found. If isDead is true, defs that are not dead are skipped. If TargetRegisterInfo is non-null, then it also checks if there is a def of a super-register.

Definition at line 660 of file MachineInstr.cpp.

References getNumOperands(), getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isDead(), llvm::MachineOperand::isDef(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), and llvm::TargetRegisterInfo::isSubRegister().

Referenced by findRegisterDefOperand(), modifiesRegister(), PropagateDeadness(), and registerDefIsDead().

MachineOperand* llvm::MachineInstr::findRegisterDefOperand ( unsigned  Reg,
bool  isDead = false,
const TargetRegisterInfo *  TRI = NULL 
) [inline]

findRegisterDefOperand - Wrapper for findRegisterDefOperandIdx, it returns a pointer to the MachineOperand rather than an index.

Definition at line 234 of file MachineInstr.h.

References findRegisterDefOperandIdx(), getOperand(), Idx, and TRI.

int MachineInstr::findFirstPredOperandIdx (  )  const

findFirstPredOperandIdx() - Find the index of the first operand in the operand list that is used to represent the predicate. It returns -1 if none is found.

findFirstPredOperandIdx() - Find the index of the first operand in the operand list that is used to represent the predicate. It returns -1 if none is found.

Definition at line 681 of file MachineInstr.cpp.

References getDesc(), getNumOperands(), llvm::TargetInstrDesc::isPredicable(), llvm::TargetOperandInfo::isPredicate(), and llvm::TargetInstrDesc::OpInfo.

Referenced by llvm::ARMRegisterInfo::eliminateFrameIndex(), getInstrPredicate(), llvm::ARMInstrInfo::getPredicate(), llvm::ARMInstrInfo::isPredicated(), and llvm::ARMInstrInfo::PredicateInstruction().

bool MachineInstr::isRegReDefinedByTwoAddr ( unsigned  DefIdx  )  const

isRegReDefinedByTwoAddr - Given the index of a register def operand, check if the register def is a re-definition due to two addr elimination.

isRegReDefinedByTwoAddr - Given the index of a register def operand, check if the register def is a re-definition due to two addr elimination.

Definition at line 694 of file MachineInstr.cpp.

References getDesc(), llvm::TargetInstrDesc::getNumOperands(), getOperand(), llvm::TargetInstrDesc::getOperandConstraint(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isUse(), and llvm::TOI::TIED_TO.

void MachineInstr::copyKillDeadInfo ( const MachineInstr *  MI  ) 

void MachineInstr::copyPredicates ( const MachineInstr *  MI  ) 

bool MachineInstr::addRegisterKilled ( unsigned  IncomingReg,
const TargetRegisterInfo *  RegInfo,
bool  AddIfNotFound = false 
)

bool MachineInstr::addRegisterDead ( unsigned  IncomingReg,
const TargetRegisterInfo *  RegInfo,
bool  AddIfNotFound = false 
)

bool MachineInstr::isSafeToMove ( const TargetInstrInfo *  TII,
bool &  SawStore 
) const

isSafeToMove - Return true if it is safe to move this instruction. If SawStore is set to true, it means that there is a store (or call) between the instruction's location and its intended destination.

isSafeToMove - Return true if it is safe to move this instruction. If SawStore is set to true, it means that there is a store (or call) between the instruction's location and its intended destination.

Definition at line 742 of file MachineInstr.cpp.

References llvm::TargetInstrDesc::hasUnmodeledSideEffects(), hasVolatileMemoryRef(), llvm::TargetInstrDesc::isCall(), llvm::TargetInstrInfo::isInvariantLoad(), llvm::TargetInstrDesc::isTerminator(), llvm::TargetInstrDesc::mayLoad(), and llvm::TargetInstrDesc::mayStore().

Referenced by isSafeToReMat().

bool MachineInstr::isSafeToReMat ( const TargetInstrInfo *  TII,
unsigned  DstReg 
) const

isSafeToReMat - Return true if it's safe to rematerialize the specified instruction which defined the specified register instead of copying it.

isSafeToReMat - Return true if it's safe to rematerialize the specified instruction which defined the specified register instead of copying it.

Definition at line 767 of file MachineInstr.cpp.

References getDesc(), getNumOperands(), getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isDead(), llvm::MachineOperand::isReg(), isSafeToMove(), llvm::TargetInstrInfo::isTriviallyReMaterializable(), and llvm::MachineOperand::isUse().

bool MachineInstr::hasVolatileMemoryRef (  )  const

hasVolatileMemoryRef - Return true if this instruction may have a volatile memory reference, or if the information describing the memory reference is not available. Return false if it is known to have no volatile memory references.

hasVolatileMemoryRef - Return true if this instruction may have a volatile memory reference, or if the information describing the memory reference is not available. Return false if it is known to have no volatile memory references.

Definition at line 795 of file MachineInstr.cpp.

References E, llvm::TargetInstrDesc::hasUnmodeledSideEffects(), llvm::TargetInstrDesc::isCall(), llvm::TargetInstrDesc::mayLoad(), llvm::TargetInstrDesc::mayStore(), memoperands_begin(), memoperands_empty(), and memoperands_end().

Referenced by llvm::ScheduleDAGInstrs::BuildSchedGraph(), and isSafeToMove().

void llvm::MachineInstr::print ( std::ostream *  OS,
const TargetMachine *  TM 
) const [inline]

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

Definition at line 821 of file MachineInstr.cpp.

References print().

void llvm::MachineInstr::print ( std::ostream *  OS  )  const [inline]

Definition at line 293 of file MachineInstr.h.

References print().

void llvm::MachineInstr::print ( raw_ostream *  OS,
const TargetMachine *  TM 
) const [inline]

Definition at line 294 of file MachineInstr.h.

References print().

void MachineInstr::print ( raw_ostream &  OS,
const TargetMachine *  TM = 0 
) const

void llvm::MachineInstr::print ( raw_ostream *  OS  )  const [inline]

Definition at line 298 of file MachineInstr.h.

References print().

void MachineInstr::dump (  )  const

void MachineInstr::addOperand ( const MachineOperand &  Op  ) 

addOperand - Add the specified operand to the instruction. If it is an implicit operand, it is added to the end of the operand list. If it is an explicit operand it is added at the end of the explicit operand list (before the first implicit operand).

addOperand - Add the specified operand to the instruction. If it is an implicit operand, it is added to the end of the operand list. If it is an explicit operand it is added at the end of the explicit operand list (before the first implicit operand).

Definition at line 447 of file MachineInstr.cpp.

References llvm::MachineOperand::isImplicit(), and llvm::MachineOperand::isReg().

Referenced by llvm::MachineInstrBuilder::addConstantPoolIndex(), llvm::MachineInstrBuilder::addExternalSymbol(), llvm::MachineInstrBuilder::addFPImm(), llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addGlobalAddress(), llvm::MachineInstrBuilder::addImm(), llvm::LiveIntervals::addIntervalsForSpills(), llvm::MachineInstrBuilder::addJumpTableIndex(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), addRegisterDead(), addRegisterKilled(), copyPredicates(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::ScheduleDAGSDNodes::EmitNode(), llvm::ARMInstrInfo::PredicateInstruction(), llvm::ARMInstrInfo::restoreCalleeSavedRegisters(), and llvm::LiveVariables::runOnMachineFunction().

void llvm::MachineInstr::setDesc ( const TargetInstrDesc &  tid  )  [inline]

void llvm::MachineInstr::setDebugLoc ( const DebugLoc  dl  )  [inline]

setDebugLoc - Replace current source information with new such. Avoid using this, the constructor argument is preferable.

Definition at line 318 of file MachineInstr.h.

void MachineInstr::RemoveOperand ( unsigned  OpNo  ) 

RemoveOperand - Erase an operand from an instruction, leaving it with one fewer operand than it started with.

RemoveOperand - Erase an operand from an instruction, leaving it with one fewer operand than it started with.

Definition at line 530 of file MachineInstr.cpp.

Referenced by addRegisterDead(), addRegisterKilled(), and llvm::ARMRegisterInfo::eliminateFrameIndex().

void MachineInstr::addMemOperand ( MachineFunction &  MF,
const MachineMemOperand &  MO 
)

addMemOperand - Add a MachineMemOperand to the machine instruction, referencing arbitrary storage.

addMemOperand - Add a MachineMemOperand to the machine instruction, referencing arbitrary storage.

Definition at line 566 of file MachineInstr.cpp.

Referenced by llvm::ScheduleDAG::AddMemOperand(), llvm::MachineInstrBuilder::addMemOperand(), and llvm::TargetInstrInfo::foldMemoryOperand().

void MachineInstr::clearMemOperands ( MachineFunction &  MF  ) 

clearMemOperands - Erase all of this MachineInstr's MachineMemOperands.

Definition at line 572 of file MachineInstr.cpp.

Referenced by llvm::MachineFunction::DeleteMachineInstr().


Friends And Related Function Documentation

friend struct ilist_traits< MachineInstr > [friend]

Definition at line 56 of file MachineInstr.h.

friend struct ilist_traits< MachineBasicBlock > [friend]

Definition at line 57 of file MachineInstr.h.

friend struct ilist_sentinel_traits< MachineInstr > [friend]

Definition at line 58 of file MachineInstr.h.

friend class MachineFunction [friend]

Definition at line 100 of file MachineInstr.h.


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