[−][src]Struct peepmatic_runtime::optimizations::PeepholeOptimizations
A compiled set of peephole optimizations.
This is the compilation result of the peepmatic
crate, after its taken a
bunch of optimizations written in the DSL and lowered and combined them.
Fields
paths: PathInterner
The instruction paths referenced by the peephole optimizations.
integers: IntegerInterner
Not all integers we're matching on fit in the u32
that we use as the
result of match operations. So we intern them and refer to them by id.
automata: Automaton<MatchResult, MatchOp, Box<[Action]>>
The underlying automata for matching optimizations' left-hand sides, and building up the corresponding right-hand side.
Implementations
impl PeepholeOptimizations
[src]
pub fn deserialize(serialized: &[u8]) -> Result<Self>
[src]
Deserialize a PeepholeOptimizations
from bytes.
pub fn optimizer<'peep, 'ctx, I>(
&'peep self,
instr_set: I
) -> PeepholeOptimizer<'peep, 'ctx, I> where
I: InstructionSet<'ctx>,
[src]
&'peep self,
instr_set: I
) -> PeepholeOptimizer<'peep, 'ctx, I> where
I: InstructionSet<'ctx>,
Create a new peephole optimizer instance from this set of peephole optimizations.
The peephole optimizer instance can be used to apply these peephole optimizations. When checking multiple instructions for whether they can be optimized, it is more performant to reuse a single peephole optimizer instance, rather than create a new one for each instruction. Reusing the peephole optimizer instance allows the reuse of a few internal allocations.
Trait Implementations
impl Debug for PeepholeOptimizations
[src]
impl<'de> Deserialize<'de> for PeepholeOptimizations
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for PeepholeOptimizations
[src]
Auto Trait Implementations
impl !RefUnwindSafe for PeepholeOptimizations
impl !Send for PeepholeOptimizations
impl !Sync for PeepholeOptimizations
impl Unpin for PeepholeOptimizations
impl !UnwindSafe for PeepholeOptimizations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,