ΒΆunsigned int constrainOperandRegClass(
const llvm::MachineFunction& MF,
const llvm::TargetRegisterInfo& TRI,
llvm::MachineRegisterInfo& MRI,
const llvm::TargetInstrInfo& TII,
const llvm::RegisterBankInfo& RBI,
llvm::MachineInstr& InsertPt,
const llvm::TargetRegisterClass& RegClass,
const llvm::MachineOperand& RegMO,
unsigned int OpIdx)
unsigned int constrainOperandRegClass(
const llvm::MachineFunction& MF,
const llvm::TargetRegisterInfo& TRI,
llvm::MachineRegisterInfo& MRI,
const llvm::TargetInstrInfo& TII,
const llvm::RegisterBankInfo& RBI,
llvm::MachineInstr& InsertPt,
const llvm::TargetRegisterClass& RegClass,
const llvm::MachineOperand& RegMO,
unsigned int OpIdx)
Description
Constrain the Register operand OpIdx, so that it is now constrained to the TargetRegisterClass passed as an argument (RegClass). If this fails, create a new virtual register in the correct class and insert a COPY before \p InsertPt if it is a use or after if it is a definition. The debug location of \p InsertPt is used for the new copy.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/Utils.h:57
Parameters
- const llvm::MachineFunction& MF
- const llvm::TargetRegisterInfo& TRI
- llvm::MachineRegisterInfo& MRI
- const llvm::TargetInstrInfo& TII
- const llvm::RegisterBankInfo& RBI
- llvm::MachineInstr& InsertPt
- const llvm::TargetRegisterClass& RegClass
- const llvm::MachineOperand& RegMO
- unsigned int OpIdx
Returns
The virtual register constrained to the right register class.