pub type RegClass = RegClass;Expand description
A register class. Each register in the ISA has one class, and the classes are disjoint. Most modern ISAs will have just two classes: the integer/general-purpose registers (GPRs), and the float/vector registers (typically used for both).
Note that unlike some other compiler backend/register allocator
designs, we do not allow for overlapping classes, i.e. registers
that belong to more than one class, because doing so makes the
allocation problem significantly more complex. Instead, when a
register can be addressed under different names for different
sizes (for example), the backend author should pick classes that
denote some fundamental allocation unit that encompasses the whole
register. For example, always allocate 128-bit vector registers
v0..vN, even though f32 and f64 values may use only the
low 32/64 bits of those registers and name them differently.
Aliased Type§
pub enum RegClass {
Int = 0,
Float = 1,
Vector = 2,
}