ΒΆunsigned int constrainRegToClass(
    llvm::MachineRegisterInfo& MRI,
    const llvm::TargetInstrInfo& TII,
    const llvm::RegisterBankInfo& RBI,
    unsigned int Reg,
    const llvm::TargetRegisterClass& RegClass)

Description

Try to constrain Reg to the specified register class. If this fails, create a new virtual register in the correct class.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/Utils.h:45

Parameters

llvm::MachineRegisterInfo& MRI
const llvm::TargetInstrInfo& TII
const llvm::RegisterBankInfo& RBI
unsigned int Reg
const llvm::TargetRegisterClass& RegClass

Returns

The virtual register constrained to the right register class.