LLVM API Documentation
#include <MachineInstr.h>
Collaboration diagram for llvm::MachineInstr:
Definition at line 220 of file MachineInstr.h.
MachineInstr::MachineInstr | ( | short | Opcode, | |
unsigned | numOperands | |||
) |
MachineInstr ctor - This constructor reserve's space for numOperand operands.
Definition at line 40 of file MachineInstr.cpp.
References llvm::LeakDetector::addGarbageObject().
MachineInstr::MachineInstr | ( | MachineBasicBlock * | MBB, | |
short | Opcode, | |||
unsigned | numOps | |||
) |
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 50 of file MachineInstr.cpp.
References llvm::LeakDetector::addGarbageObject(), MBB, and llvm::MachineBasicBlock::push_back().
MachineInstr::~MachineInstr | ( | ) |
Definition at line 77 of file MachineInstr.cpp.
References llvm::LeakDetector::removeGarbageObject().
const MachineBasicBlock* llvm::MachineInstr::getParent | ( | ) | const [inline] |
Definition at line 249 of file MachineInstr.h.
Referenced by llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::IA64RegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::LiveVariables::HandleVirtRegUse(), HandleVRSaveUpdate(), llvm::LiveVariables::MarkVirtRegAliveInBlock(), llvm::operator<<(), removeFromParent(), and RemoveVRSaveCode().
MachineBasicBlock* llvm::MachineInstr::getParent | ( | ) | [inline] |
Definition at line 250 of file MachineInstr.h.
const int llvm::MachineInstr::getOpcode | ( | ) | const [inline] |
getOpcode - Returns the opcode of this MachineInstr.
Definition at line 254 of file MachineInstr.h.
Referenced by llvm::X86InstrInfo::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::X86RegisterInfo::eliminateCallFramePseudoInstr(), llvm::SparcRegisterInfo::eliminateCallFramePseudoInstr(), llvm::PPCRegisterInfo::eliminateCallFramePseudoInstr(), llvm::IA64RegisterInfo::eliminateCallFramePseudoInstr(), llvm::AlphaRegisterInfo::eliminateCallFramePseudoInstr(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::foldMemoryOperand(), llvm::SparcRegisterInfo::foldMemoryOperand(), llvm::PPCRegisterInfo::foldMemoryOperand(), llvm::AlphaRegisterInfo::foldMemoryOperand(), getNumBytesForInstruction(), llvm::X86TargetLowering::InsertAtEndOfBasicBlock(), llvm::PPCTargetLowering::InsertAtEndOfBasicBlock(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::AlphaInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isMoveInstr(), llvm::SparcInstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::IA64InstrInfo::isMoveInstr(), llvm::ARMInstrInfo::isMoveInstr(), llvm::AlphaInstrInfo::isMoveInstr(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::AlphaInstrInfo::isStoreToStackSlot(), llvm::operator<<(), print(), llvm::X86IntelAsmPrinter::printMachineInstruction(), llvm::X86ATTAsmPrinter::printMachineInstruction(), and llvm::LiveVariables::runOnMachineFunction().
unsigned llvm::MachineInstr::getNumOperands | ( | ) | const [inline] |
Access to explicit operands of the instruction.
Definition at line 258 of file MachineInstr.h.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::IA64RegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), getNumBytesForInstruction(), getOperand(), llvm::LiveVariables::instructionChanged(), InstructionUsesRegister(), llvm::X86SharedAsmPrinter::isMem(), llvm::X86InstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::IA64InstrInfo::isMoveInstr(), llvm::ARMInstrInfo::isMoveInstr(), llvm::AlphaInstrInfo::isMoveInstr(), llvm::operator<<(), print(), llvm::AsmPrinter::printInlineAsm(), and llvm::LiveVariables::runOnMachineFunction().
const MachineOperand& llvm::MachineInstr::getOperand | ( | unsigned | i | ) | const [inline] |
Definition at line 260 of file MachineInstr.h.
References getNumOperands().
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::X86InstrInfo::commuteInstruction(), llvm::TargetInstrInfo::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::X86RegisterInfo::eliminateCallFramePseudoInstr(), llvm::SparcRegisterInfo::eliminateCallFramePseudoInstr(), llvm::PPCRegisterInfo::eliminateCallFramePseudoInstr(), llvm::IA64RegisterInfo::eliminateCallFramePseudoInstr(), llvm::AlphaRegisterInfo::eliminateCallFramePseudoInstr(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::IA64RegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::foldMemoryOperand(), llvm::PPCRegisterInfo::foldMemoryOperand(), llvm::AlphaRegisterInfo::foldMemoryOperand(), getNumBytesForInstruction(), HandleVRSaveUpdate(), llvm::X86TargetLowering::InsertAtEndOfBasicBlock(), llvm::PPCTargetLowering::InsertAtEndOfBasicBlock(), llvm::LiveVariables::instructionChanged(), InstructionUsesRegister(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::AlphaInstrInfo::isLoadFromStackSlot(), llvm::X86SharedAsmPrinter::isMem(), llvm::X86InstrInfo::isMoveInstr(), llvm::SparcInstrInfo::isMoveInstr(), llvm::PPCInstrInfo::isMoveInstr(), llvm::IA64InstrInfo::isMoveInstr(), llvm::ARMInstrInfo::isMoveInstr(), llvm::AlphaInstrInfo::isMoveInstr(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::AlphaInstrInfo::isStoreToStackSlot(), MakeMIInst(), MakeMRIInst(), MakeMRInst(), MakeRMIInst(), MakeRMInst(), llvm::operator<<(), print(), llvm::X86IntelAsmPrinter::PrintAsmOperand(), llvm::X86ATTAsmPrinter::PrintAsmOperand(), llvm::AsmPrinter::printInlineAsm(), llvm::X86IntelAsmPrinter::printMachineInstruction(), llvm::X86ATTAsmPrinter::printMachineInstruction(), llvm::X86IntelAsmPrinter::printMemReference(), llvm::X86ATTAsmPrinter::printMemReference(), llvm::X86IntelAsmPrinter::printOperand(), llvm::X86ATTAsmPrinter::printOperand(), llvm::X86IntelAsmPrinter::printSSECC(), llvm::X86ATTAsmPrinter::printSSECC(), llvm::LiveVariables::runOnMachineFunction(), and llvm::VirtRegMap::virtFolded().
MachineOperand& llvm::MachineInstr::getOperand | ( | unsigned | i | ) | [inline] |
MachineInstr* llvm::MachineInstr::clone | ( | ) | const [inline] |
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 272 of file MachineInstr.h.
MachineInstr * MachineInstr::removeFromParent | ( | ) |
removeFromParent - This method unlinks 'this' from the containing basic block, and returns it, but does not delete it.
Definition at line 83 of file MachineInstr.cpp.
References getParent(), and llvm::MachineBasicBlock::remove().
Referenced by eraseFromParent().
void llvm::MachineInstr::eraseFromParent | ( | ) | [inline] |
eraseFromParent - This method unlinks 'this' from the containing basic block and deletes it.
Definition at line 280 of file MachineInstr.h.
References removeFromParent().
Referenced by CleanupConstantGlobalUsers(), HandleVRSaveUpdate(), OptimizeGlobalAddressOfMalloc(), and RemoveVRSaveCode().
void MachineInstr::print | ( | std::ostream & | OS, | |
const TargetMachine * | TM | |||
) | const |
Definition at line 157 of file MachineInstr.cpp.
References llvm::TargetMachine::getInstrInfo(), llvm::TargetInstrInfo::getName(), getNumOperands(), getOpcode(), getOperand(), and TM.
Referenced by llvm::operator<<().
void MachineInstr::dump | ( | ) | const |
void llvm::MachineInstr::addRegOperand | ( | unsigned | Reg, | |
MachineOperand::UseType | UTy = MachineOperand::Use | |||
) | [inline] |
addRegOperand - Add a register operand.
Definition at line 297 of file MachineInstr.h.
References llvm::MachineOperand::MO_Register, and Op.
Referenced by llvm::MachineInstrBuilder::addReg(), CreateVirtualRegisters(), and llvm::ScheduleDAG::EmitNode().
void llvm::MachineInstr::addImmOperand | ( | int64_t | Val | ) | [inline] |
addImmOperand - Add a zero extended constant argument to the machine instruction.
Definition at line 309 of file MachineInstr.h.
References llvm::MachineOperand::MO_Immediate, and Op.
Referenced by llvm::MachineInstrBuilder::addImm(), and llvm::ScheduleDAG::EmitNode().
void llvm::MachineInstr::addMachineBasicBlockOperand | ( | MachineBasicBlock * | MBB | ) | [inline] |
Definition at line 317 of file MachineInstr.h.
References MBB, llvm::MachineOperand::MO_MachineBasicBlock, and Op.
Referenced by llvm::MachineInstrBuilder::addMBB().
void llvm::MachineInstr::addFrameIndexOperand | ( | unsigned | Idx | ) | [inline] |
addFrameIndexOperand - Add an abstract frame index to the instruction
Definition at line 327 of file MachineInstr.h.
References llvm::MachineOperand::MO_FrameIndex, and Op.
Referenced by llvm::MachineInstrBuilder::addFrameIndex().
void llvm::MachineInstr::addConstantPoolIndexOperand | ( | unsigned | Idx, | |
int | Offset | |||
) | [inline] |
addConstantPoolndexOperand - Add a constant pool object index to the instruction.
Definition at line 338 of file MachineInstr.h.
References llvm::MachineOperand::MO_ConstantPoolIndex, and Op.
Referenced by llvm::MachineInstrBuilder::addConstantPoolIndex().
void llvm::MachineInstr::addJumpTableIndexOperand | ( | unsigned | Idx | ) | [inline] |
addJumpTableIndexOperand - Add a jump table object index to the instruction.
Definition at line 349 of file MachineInstr.h.
References llvm::MachineOperand::MO_JumpTableIndex, and Op.
Referenced by llvm::MachineInstrBuilder::addJumpTableIndex().
void llvm::MachineInstr::addGlobalAddressOperand | ( | GlobalValue * | GV, | |
int | Offset | |||
) | [inline] |
Definition at line 357 of file MachineInstr.h.
References GV, llvm::MachineOperand::MO_GlobalAddress, and Op.
Referenced by llvm::MachineInstrBuilder::addGlobalAddress().
void llvm::MachineInstr::addExternalSymbolOperand | ( | const char * | SymName | ) | [inline] |
addExternalSymbolOperand - Add an external symbol operand to this instr
Definition at line 367 of file MachineInstr.h.
References llvm::MachineOperand::MO_ExternalSymbol, and Op.
Referenced by llvm::MachineInstrBuilder::addExternalSymbol(), and llvm::ScheduleDAG::EmitNode().
void llvm::MachineInstr::setOpcode | ( | unsigned | Op | ) | [inline] |
setOpcode - Replace the opcode of the current instruction with a new one.
Definition at line 381 of file MachineInstr.h.
Referenced by llvm::PPCRegisterInfo::eliminateFrameIndex().
void llvm::MachineInstr::RemoveOperand | ( | unsigned | i | ) | [inline] |
RemoveOperand - Erase an operand from an instruction, leaving it with one fewer operand than it started with.
Definition at line 386 of file MachineInstr.h.
friend struct ilist_traits< MachineInstr > [friend] |
Definition at line 234 of file MachineInstr.h.
std::ostream& operator<< | ( | std::ostream & | os, | |
const MachineInstr & | minstr | |||
) | [friend] |
Definition at line 189 of file MachineInstr.cpp.