LLVM API Documentation
#include <MachineInstr.h>
Collaboration diagram for llvm::MachineInstr:
Public Types | |
typedef ValOpIterator< const MachineInstr *, const Value * > | const_val_op_iterator |
typedef ValOpIterator< MachineInstr *, Value * > | val_op_iterator |
Public Member Functions | |
MachineInstr (short Opcode, unsigned numOperands) | |
MachineInstr (short Opcode, unsigned numOperands, bool XX, bool YY) | |
MachineInstr (MachineBasicBlock *MBB, short Opcode, unsigned numOps) | |
~MachineInstr () | |
const MachineBasicBlock * | getParent () const |
MachineBasicBlock * | getParent () |
const int | getOpcode () const |
unsigned | getNumOperands () const |
const MachineOperand & | getOperand (unsigned i) const |
MachineOperand & | getOperand (unsigned i) |
const MachineOperand & | getExplOrImplOperand (unsigned i) const |
unsigned | getNumImplicitRefs () const |
MachineOperand & | getImplicitOp (unsigned i) |
const MachineOperand & | getImplicitOp (unsigned i) const |
Value * | getImplicitRef (unsigned i) |
const Value * | getImplicitRef (unsigned i) const |
void | addImplicitRef (Value *V, bool isDef=false, bool isDefAndUse=false) |
void | setImplicitRef (unsigned i, Value *V) |
MachineInstr * | clone () const |
void | print (std::ostream &OS, const TargetMachine *TM) const |
void | dump () const |
void | addRegOperand (Value *V, bool isDef, bool isDefAndUse=false) |
void | addRegOperand (Value *V, MachineOperand::UseType UTy=MachineOperand::Use, bool isPCRelative=false) |
void | addCCRegOperand (Value *V, MachineOperand::UseType UTy=MachineOperand::Use) |
void | addRegOperand (int reg, bool isDef) |
void | addRegOperand (int reg, MachineOperand::UseType UTy=MachineOperand::Use) |
void | addPCDispOperand (Value *V) |
void | addMachineRegOperand (int reg, bool isDef) |
void | addMachineRegOperand (int reg, MachineOperand::UseType UTy=MachineOperand::Use) |
void | addZeroExtImmOperand (int intValue) |
void | addSignExtImmOperand (int intValue) |
void | addMachineBasicBlockOperand (MachineBasicBlock *MBB) |
void | addFrameIndexOperand (unsigned Idx) |
void | addConstantPoolIndexOperand (unsigned I) |
void | addGlobalAddressOperand (GlobalValue *GV, bool isPCRelative, int Offset) |
void | addExternalSymbolOperand (const char *SymName, bool isPCRelative) |
void | replace (short Opcode, unsigned numOperands) |
void | setOpcode (unsigned Op) |
void | RemoveOperand (unsigned i) |
void | SetMachineOperandVal (unsigned i, MachineOperand::MachineOperandType operandType, Value *V) |
void | SetMachineOperandConst (unsigned i, MachineOperand::MachineOperandType operandType, int intValue) |
void | SetMachineOperandReg (unsigned i, int regNum) |
unsigned | substituteValue (const Value *oldVal, Value *newVal, bool defsOnly, bool notDefsAndUses, bool &someArgsWereIgnored) |
void | SetRegForOperand (unsigned i, int regNum) |
void | SetRegForImplicitRef (unsigned i, int regNum) |
val_op_iterator | begin () |
val_op_iterator | end () |
const_val_op_iterator | begin () const |
const_val_op_iterator | end () const |
Friends | |
struct | ilist_traits< MachineInstr > |
std::ostream & | operator<< (std::ostream &os, const MachineInstr &minstr) |
Classes | |
class | ValOpIterator |
Definition at line 393 of file MachineInstr.h.
|
Definition at line 509 of file MachineInstr.h. |
|
Definition at line 511 of file MachineInstr.h. |
|
Definition at line 40 of file MachineInstr.cpp. References llvm::LeakDetector::addGarbageObject(). |
|
MachineInstr ctor - This constructor only does a _reserve_ of the operands, not a resize for them. It is expected that if you use this that you call add* methods below to fill up the operands, instead of the Set methods. Eventually, the "resizing" ctors will be phased out. Definition at line 54 of file MachineInstr.cpp. References llvm::LeakDetector::addGarbageObject(). |
|
MachineInstr ctor - Work exactly the same as the ctor above, except that the MachineInstr is created and added to the end of the specified basic block. Definition at line 64 of file MachineInstr.cpp. References llvm::LeakDetector::addGarbageObject(), and llvm::MachineBasicBlock::push_back(). |
|
Definition at line 92 of file MachineInstr.cpp. References llvm::LeakDetector::removeGarbageObject(). |
|
Definition at line 540 of file MachineInstr.h. References llvm::MachineOperand::MO_CCRegister. |
|
addConstantPoolndexOperand - Add a constant pool object index to the instruction. Definition at line 635 of file MachineInstr.h. References llvm::MachineOperand::MO_ConstantPoolIndex. |
|
addExternalSymbolOperand - Add an external symbol operand to this instr Definition at line 651 of file MachineInstr.h. |
|
addFrameIndexOperand - Add an abstract frame index to the instruction Definition at line 626 of file MachineInstr.h. References llvm::MachineOperand::MO_FrameIndex. |
|
Definition at line 641 of file MachineInstr.h. References llvm::MachineOperand::MO_GlobalAddress, and llvm::MachineOperand::Use. |
|
Definition at line 483 of file MachineInstr.h. References addRegOperand(). |
|
Definition at line 618 of file MachineInstr.h. |
|
addMachineRegOperand - Add a virtual register operand to this MachineInstr Definition at line 590 of file MachineInstr.h. References llvm::MachineOperand::MO_MachineRegister. |
|
addMachineRegOperand - Add a virtual register operand to this MachineInstr Definition at line 580 of file MachineInstr.h. References llvm::MachineOperand::Def, llvm::MachineOperand::MO_MachineRegister, and llvm::MachineOperand::Use. |
|
addPCDispOperand - Add a PC relative displacement operand to the MI Definition at line 571 of file MachineInstr.h. References llvm::MachineOperand::MO_PCRelativeDisp, and llvm::MachineOperand::Use. |
|
addRegOperand - Add a symbolic virtual register reference... Definition at line 561 of file MachineInstr.h. References llvm::MachineOperand::MO_VirtualRegister. |
|
addRegOperand - Add a symbolic virtual register reference... Definition at line 551 of file MachineInstr.h. References llvm::MachineOperand::Def, llvm::MachineOperand::MO_VirtualRegister, and llvm::MachineOperand::Use. |
|
Definition at line 531 of file MachineInstr.h. References llvm::MachineOperand::MO_VirtualRegister. |
|
addRegOperand - Add a MO_VirtualRegister operand to the end of the operands list... Definition at line 521 of file MachineInstr.h. References llvm::MachineOperand::Def, llvm::MachineOperand::MO_VirtualRegister, llvm::MachineOperand::Use, and llvm::MachineOperand::UseAndDef. Referenced by addImplicitRef(), and llvm::MachineInstrBuilder::addReg(). |
|
addSignExtImmOperand - Add a zero extended constant argument to the machine instruction. Definition at line 611 of file MachineInstr.h. References llvm::MachineOperand::MO_SignExtendedImmed. |
|
addZeroExtImmOperand - Add a zero extended constant argument to the machine instruction. Definition at line 601 of file MachineInstr.h. References llvm::MachineOperand::MO_UnextendedImmed. |
|
Definition at line 758 of file MachineInstr.h. References llvm::MachineInstr::ValOpIterator< MITy, VTy >::begin(). |
|
Definition at line 755 of file MachineInstr.h. References llvm::MachineInstr::ValOpIterator< MITy, VTy >::begin(). Referenced by llvm::applyTranferFuncForMInst(), llvm::LiveRangeInfo::coalesceLRs(), llvm::LiveRangeInfo::constructLiveRanges(), and substituteValue(). |
|
clone - Create a copy of 'this' instruction that is identical in all ways except the the instruction has no parent, prev, or next. Definition at line 99 of file MachineInstr.cpp. |
|
Definition at line 212 of file MachineInstr.cpp. Referenced by llvm::LiveRangeInfo::coalesceLRs(). |
|
Definition at line 761 of file MachineInstr.h. References llvm::MachineInstr::ValOpIterator< MITy, VTy >::end(). |
|
Definition at line 756 of file MachineInstr.h. References llvm::MachineInstr::ValOpIterator< MITy, VTy >::end(). Referenced by llvm::applyTranferFuncForMInst(), llvm::LiveRangeInfo::coalesceLRs(), llvm::LiveRangeInfo::constructLiveRanges(), and substituteValue(). |
|
Definition at line 456 of file MachineInstr.h. References getImplicitOp(), getNumOperands(), and getOperand(). |
|
Definition at line 471 of file MachineInstr.h. |
|
Definition at line 467 of file MachineInstr.h. Referenced by llvm::applyTranferFuncForMInst(), llvm::LiveRangeInfo::constructLiveRanges(), getExplOrImplOperand(), getImplicitRef(), llvm::operator<<(), print(), SetRegForImplicitRef(), and substituteValue(). |
|
Definition at line 479 of file MachineInstr.h. References getImplicitOp(), and llvm::MachineOperand::getVRegValue(). |
|
Definition at line 476 of file MachineInstr.h. References getImplicitOp(), and llvm::MachineOperand::getVRegValue(). Referenced by llvm::applyTranferFuncForMInst(), llvm::LiveRangeInfo::constructLiveRanges(), llvm::CallArgsDescriptor::get(), llvm::operator<<(), print(), and substituteValue(). |
|
Definition at line 465 of file MachineInstr.h. Referenced by llvm::applyTranferFuncForMInst(), llvm::CallArgsDescriptor::get(), llvm::operator<<(), print(), replace(), setImplicitRef(), and substituteValue(). |
|
|
|
Definition at line 445 of file MachineInstr.h. References getNumOperands(). |
|
|
Definition at line 431 of file MachineInstr.h. |
|
|
Definition at line 322 of file MachineInstr.cpp. References getImplicitOp(), getImplicitRef(), llvm::TargetMachine::getInstrInfo(), llvm::TargetInstrInfo::getName(), getNumImplicitRefs(), getNumOperands(), getOpcode(), getOperand(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isUse(), and OutputValue(). Referenced by llvm::operator<<(). |
|
RemoveOperand - Erase an operand from an instruction, leaving it with one fewer operand than it started with. Definition at line 673 of file MachineInstr.h. |
|
replace - Support to rewrite a machine instruction in place: for now, simply replace() and then set new operands with Set.*Operand methods below. Definition at line 116 of file MachineInstr.cpp. References getNumImplicitRefs(). |
|
Definition at line 487 of file MachineInstr.h. References getNumImplicitRefs(), getNumOperands(), llvm::MachineOperand::MO_VirtualRegister, and SetMachineOperandVal(). |
|
Definition at line 134 of file MachineInstr.cpp. References getNumOperands(), and llvm::TargetInstrDescriptors. Referenced by llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::PPC64RegisterInfo::eliminateFrameIndex(), llvm::PPC32RegisterInfo::eliminateFrameIndex(), and llvm::SparcV9CodeEmitter::runOnMachineFunction(). |
|
Definition at line 148 of file MachineInstr.cpp. References getNumOperands(), and llvm::MachineOperand::MO_MachineRegister. Referenced by llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::PPC64RegisterInfo::eliminateFrameIndex(), and llvm::PPC32RegisterInfo::eliminateFrameIndex(). |
|
Definition at line 124 of file MachineInstr.cpp. Referenced by setImplicitRef(). |
|
setOpcode - Replace the opcode of the current instruction with a new one. Definition at line 668 of file MachineInstr.h. Referenced by llvm::PPC64RegisterInfo::eliminateFrameIndex(), and llvm::PPC32RegisterInfo::eliminateFrameIndex(). |
|
Definition at line 163 of file MachineInstr.cpp. References getImplicitOp(), and llvm::MachineOperand::setRegForValue(). |
|
Definition at line 157 of file MachineInstr.cpp. References getNumOperands(). |
|
substituteValue - Substitute all occurrences of Value* oldVal with newVal in all operands and all implicit refs. If defsOnly == true, substitute defs only. FIXME: Fold this into its single caller, at SparcInstrSelection.cpp:2865, or make it a static function in that file. Definition at line 175 of file MachineInstr.cpp. References begin(), llvm::MachineOperand::contents, E, end(), getImplicitOp(), getImplicitRef(), getNumImplicitRefs(), llvm::MachineOperand::isDef(), and llvm::MachineOperand::isUse(). |
|
Definition at line 410 of file MachineInstr.h. |
|
|