Struct cranelift_codegen::binemit::RegDiversions[][src]

pub struct RegDiversions { /* fields omitted */ }
Expand description

Keep track of diversions in a block.

Implementations

Create a new empty diversion tracker.

Clear the content of the diversions, to reset the state of the compiler.

Are there any diversions?

Get the current diversion of value, if any.

Get all current diversions.

Get the current location for value. Fall back to the assignment map for non-diverted values

Get the current register location for value, or panic if value isn’t in a register.

Get the current stack location for value, or panic if value isn’t in a stack slot.

Record a register -> register move.

Record a register -> stack move.

Record a stack -> register move.

Apply the effect of inst.

If inst is a regmove, regfill, or regspill instruction, update the diversions to match.

Drop any recorded move for value.

Returns the to location of the removed diversion.

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.

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

Check that the recorded entry for a given block matches what is recorded in the entry_diversions.

Return an object that can display the diversions.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.