Struct cranelift_codegen::binemit::RegDiversions [−][src]
pub struct RegDiversions { /* fields omitted */ }Keep track of diversions in an EBB.
Methods
impl RegDiversions[src]
impl RegDiversionspub fn new() -> Self[src]
pub fn new() -> SelfCreate a new empty diversion tracker.
pub fn clear(&mut self)[src]
pub fn clear(&mut self)Clear the tracker, preparing for a new EBB.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolAre there any diversions?
pub fn diversion(&self, value: Value) -> Option<&Diversion>[src]
pub fn diversion(&self, value: Value) -> Option<&Diversion>Get the current diversion of value, if any.
pub fn all(&self) -> &[Diversion][src]
pub fn all(&self) -> &[Diversion]Get all current diversions.
pub fn get(&self, value: Value, locations: &ValueLocations) -> ValueLoc[src]
pub fn get(&self, value: Value, locations: &ValueLocations) -> ValueLocGet the current location for value. Fall back to the assignment map for non-diverted
values
pub fn reg(&self, value: Value, locations: &ValueLocations) -> RegUnit[src]
pub fn reg(&self, value: Value, locations: &ValueLocations) -> RegUnitGet the current register location for value, or panic if value isn't in a register.
pub fn stack(&self, value: Value, locations: &ValueLocations) -> StackSlot[src]
pub fn stack(&self, value: Value, locations: &ValueLocations) -> StackSlotGet the current stack location for value, or panic if value isn't in a stack slot.
pub fn divert(&mut self, value: Value, from: ValueLoc, to: ValueLoc)[src]
pub fn divert(&mut self, value: Value, from: ValueLoc, to: ValueLoc)Record any kind of move.
The from location must match an existing to location, if any.
pub fn regmove(&mut self, value: Value, from: RegUnit, to: RegUnit)[src]
pub fn regmove(&mut self, value: Value, from: RegUnit, to: RegUnit)Record a register -> register move.
pub fn regspill(&mut self, value: Value, from: RegUnit, to: StackSlot)[src]
pub fn regspill(&mut self, value: Value, from: RegUnit, to: StackSlot)Record a register -> stack move.
pub fn regfill(&mut self, value: Value, from: StackSlot, to: RegUnit)[src]
pub fn regfill(&mut self, value: Value, from: StackSlot, to: RegUnit)Record a stack -> register move.
pub fn apply(&mut self, inst: &InstructionData)[src]
pub fn apply(&mut self, inst: &InstructionData)Apply the effect of inst.
If inst is a regmove, regfill, or regspill instruction, update the diversions to
match.
pub fn remove(&mut self, value: Value) -> Option<ValueLoc>[src]
pub fn remove(&mut self, value: Value) -> Option<ValueLoc>Drop any recorded move for value.
Returns the to location of the removed diversion.
pub fn display<'a, R: Into<Option<&'a RegInfo>>>(
&'a self,
regs: R
) -> DisplayDiversions<'a>[src]
pub fn display<'a, R: Into<Option<&'a RegInfo>>>(
&'a self,
regs: R
) -> DisplayDiversions<'a>Return an object that can display the diversions.
Auto Trait Implementations
impl Send for RegDiversions
impl Send for RegDiversionsimpl Sync for RegDiversions
impl Sync for RegDiversions