Struct debris_llir::opt::peephole_opt::PeepholeOptimizer
source · pub struct PeepholeOptimizer {
nodes: Vec<Node>,
opt_mode: OptMode,
value_hints: ValueHints,
}
Expand description
A just-in-time peephole optimizer.
This means, that the optimizer optimizes nodes as they are being added, while also having access to the previously emitted nodes.
A single PeepholeOptimizer
can only be active in a single context
(aka a single .mcfunction file)
Fields§
§nodes: Vec<Node>
§opt_mode: OptMode
§value_hints: ValueHints
Information about the possible values of runtime variables
Implementations§
Trait Implementations§
source§impl Debug for PeepholeOptimizer
impl Debug for PeepholeOptimizer
source§impl Extend<Node> for PeepholeOptimizer
impl Extend<Node> for PeepholeOptimizer
source§fn extend<T: IntoIterator<Item = Node>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Node>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl RefUnwindSafe for PeepholeOptimizer
impl !Send for PeepholeOptimizer
impl !Sync for PeepholeOptimizer
impl Unpin for PeepholeOptimizer
impl UnwindSafe for PeepholeOptimizer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more