llvm::constrainSelectedInstRegOperands

Constrain selected-instruction operands to the instruction register classes.

Synopsis

Declared in <llvm/CodeGen/GlobalISel/Utils.h>

void
constrainSelectedInstRegOperands(
    MachineInstr& I,
    TargetInstrInfo const& TII,
    TargetRegisterInfo const& TRI,
    RegisterBankInfo const& RBI);

Description

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.

Parameters

NameDescription
INewly selected instruction whose operands are constrained.
TIITarget instruction info.
TRITarget register info.
RBIRegister bank info.