Constrain a register operand to the class an instruction requires.
Declared in <llvm/CodeGen/FastISel.h>
Register
constrainOperandRegClass(
MCInstrDesc const& II,
Register Op,
unsigned int OpNum);
Try to constrain Op so that it is usable by argument OpNum of the provided MCInstrDesc. If this fails, create a new virtual register in the correct class and COPY the value there.
Op if already suitable, otherwise a new constrained copy.
| Name | Description |
|---|---|
| II | Descriptor of the instruction that will use the operand. |
| Op | Register operand to constrain. |
| OpNum | Operand index in II that Op will fill. |