Struct cranelift_codegen::binemit::RegDiversions [−][src]
pub struct RegDiversions { /* fields omitted */ }Expand description
Keep track of diversions in a block.
Implementations
impl RegDiversions[src]
impl RegDiversions[src]pub fn clear(&mut self)[src]
pub fn clear(&mut self)[src]Clear the content of the diversions, to reset the state of the compiler.
pub fn diversion(&self, value: Value) -> Option<&Diversion>[src]
pub fn diversion(&self, value: Value) -> Option<&Diversion>[src]Get the current diversion of value, if any.
pub fn get(&self, value: Value, locations: &ValueLocations) -> ValueLoc[src]
pub fn get(&self, value: Value, locations: &ValueLocations) -> ValueLoc[src]Get 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) -> RegUnit[src]Get 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) -> StackSlot[src]Get the current stack location for value, or panic if value isn’t in a stack slot.
pub fn regmove(&mut self, value: Value, from: RegUnit, to: RegUnit)[src]
pub fn regmove(&mut self, value: Value, from: RegUnit, to: RegUnit)[src]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)[src]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)[src]Record a stack -> register move.
pub fn apply(&mut self, inst: &InstructionData)[src]
pub fn apply(&mut self, inst: &InstructionData)[src]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>[src]Drop any recorded move for value.
Returns the to location of the removed diversion.
pub fn at_block(&mut self, entry_diversions: &EntryRegDiversions, block: Block)[src]
pub fn at_block(&mut self, entry_diversions: &EntryRegDiversions, block: Block)[src]Resets the state of the current diversions to the recorded diversions at the entry of the
given block. The recoded diversions is available after coloring on func.entry_diversions
field.
pub fn save_for_block(
&mut self,
entry_diversions: &mut EntryRegDiversions,
target: Block
)[src]
pub fn save_for_block(
&mut self,
entry_diversions: &mut EntryRegDiversions,
target: Block
)[src]Copy the current state of the diversions, and save it for the entry of the block given as
argument.
Note: This function can only be called once on a Block with a given entry_diversions
argument, otherwise it would panic.
pub fn check_block_entry(
&self,
entry_diversions: &EntryRegDiversions,
target: Block
) -> bool[src]
pub fn check_block_entry(
&self,
entry_diversions: &EntryRegDiversions,
target: Block
) -> bool[src]Check that the recorded entry for a given block matches what is recorded in the
entry_diversions.
Trait Implementations
impl Clone for RegDiversions[src]
impl Clone for RegDiversions[src]fn clone(&self) -> RegDiversions[src]
fn clone(&self) -> RegDiversions[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for RegDiversions
impl Send for RegDiversions
impl Sync for RegDiversions
impl Unpin for RegDiversions
impl UnwindSafe for RegDiversions
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more