ReloadLike

Trait ReloadLike 

Source
pub trait ReloadLike {
    // Required methods
    fn spilled(&self) -> OpOperand;
    fn reloaded(&self) -> ValueRef;

    // Provided method
    fn spilled_value(&self) -> ValueRef { ... }
}
Expand description

An operation trait for operations that implement reload-like behavior for purposes of the spills transformation/rewrite.

A reload-like operation is expected to take a single value, for which a dominating SpillLike op exists, and produce a new, unique SSA value corresponding to the reloaded spill value. The spills transformation will handle rewriting any uses of the SpillLike and ReloadLike ops such that they are not present after the transformation, in conjunction with an implementation of the TransformSpillsInterface.

Required Methods§

Source

fn spilled(&self) -> OpOperand

Returns the operand corresponding to the spilled value

Source

fn reloaded(&self) -> ValueRef

Returns the value representing this unique reload of the spilled value

Generally, this always corresponds to this op’s result

Provided Methods§

Source

fn spilled_value(&self) -> ValueRef

Returns a reference to the spilled value

Implementors§