|
LLVM
4.0.0
|
Provides the logic to select generic machine instructions. More...
#include <InstructionSelector.h>
Public Member Functions | |
| virtual | ~InstructionSelector () |
| virtual bool | select (MachineInstr &I) const =0 |
Select the (possibly generic) instruction I to only use target-specific opcodes. More... | |
Protected Member Functions | |
| InstructionSelector () | |
| bool | constrainSelectedInstRegOperands (MachineInstr &I, const TargetInstrInfo &TII, const TargetRegisterInfo &TRI, const RegisterBankInfo &RBI) const |
Mutate the newly-selected instruction I to constrain its (possibly generic) virtual register operands to the instruction's register class. More... | |
Provides the logic to select generic machine instructions.
Definition at line 26 of file InstructionSelector.h.
|
inlinevirtual |
Definition at line 28 of file InstructionSelector.h.
|
protected |
Definition at line 24 of file InstructionSelector.cpp.
|
protected |
Mutate the newly-selected instruction I to constrain its (possibly generic) virtual register operands to the instruction's register class.
This could involve inserting COPYs before (for uses) or after (for defs). This requires the number of operands to match the instruction description.
Definition at line 26 of file InstructionSelector.cpp.
References assert(), llvm::constrainOperandRegClass(), llvm::dbgs(), DEBUG, llvm::MachineInstr::getDesc(), llvm::MachineInstr::getNumExplicitOperands(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), MBB, MRI, and llvm::MachineOperand::setReg().
Referenced by llvm::ARMInstructionSelector::select(), and llvm::AArch64InstructionSelector::select().
|
pure virtual |
Select the (possibly generic) instruction I to only use target-specific opcodes.
It is OK to insert multiple instructions, but they cannot be generic pre-isel instructions.
Implemented in llvm::AArch64InstructionSelector, and llvm::ARMInstructionSelector.
1.8.6