pub struct Env { /* private fields */ }Expand description
What the allocator is allowed to use.
The order is the calling convention’s, because which register to hand out first follows from
which ones a call destroys, and rucc-target is where a convention says so. The scratch
registers are held back out of the order and are what a spilled value is read into at each
instruction that wants it, so a class needs as many of them as one of its instructions has
register operands. Nothing here uses them, since a spilled value is only read once the rewrite
is writing the instruction that reads it, but they are held back here because this is what
decides what everything else may have.
Implementations§
Source§impl Env
impl Env
Sourcepub fn new() -> Self
pub fn new() -> Self
An environment offering nothing, which is what a target that has said nothing offers.
Sourcepub fn with(
self,
class: RegClass,
order: &[PhysReg],
scratch: &[PhysReg],
) -> Self
pub fn with( self, class: RegClass, order: &[PhysReg], scratch: &[PhysReg], ) -> Self
The same environment, with that class described.