Prints virtual and physical registers with or without a TRI instance.
Declared in <llvm/CodeGen/TargetRegisterInfo.h>
Printable
printReg(
Register Reg,
TargetRegisterInfo const* TRI = nullptr,
unsigned int SubIdx = 0,
MachineRegisterInfo const* MRI = nullptr);
The format is: %noreg - NoRegister %5 - a virtual register. %5:sub_8bit - a virtual register with sub-register index (with TRI). %eax - a physical register %physreg17 - a physical register when no TRI instance given.
Usage: OS << printReg(Reg, TRI, SubRegIdx) << ' ';
Simple wrapper around std::function<void(raw_ostream&)>. This class is useful to construct print helpers for raw_ostream.
| Name | Description |
|---|---|
| Reg | Wrapper class representing virtual and physical registers. Should be passed by value. |
| TRI | TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDesc objects that represent all of the machine registers that the target has. As such, we simply have to track a pointer to this array so that we can turn register number into a register descriptor. |
| MRI | MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc. |