pub struct Optimizer {
pub main: Function,
pub global_state: GlobalState,
}Expand description
An optimizer that applies various analyses and optimization passes to the IR.
Fields§
§main: Function§global_state: GlobalStateThe overall program state
Implementations§
Source§impl Optimizer
impl Optimizer
Sourcepub fn new(
expand: Scope,
cube_dim: CubeDim,
transformers: Vec<Rc<dyn IrTransformer>>,
visitors: Vec<Box<dyn InstructionVisitor>>,
processors: Vec<Box<dyn Processor>>,
) -> Self
pub fn new( expand: Scope, cube_dim: CubeDim, transformers: Vec<Rc<dyn IrTransformer>>, visitors: Vec<Box<dyn InstructionVisitor>>, processors: Vec<Box<dyn Processor>>, ) -> Self
Create a new optimizer with the scope, CubeDim and execution mode passed into the compiler.
Parses the scope and runs several optimization and analysis loops.
Create a new optimizer with the scope, CubeDim and execution mode passed into the compiler.
Parses the scope and runs several optimization and analysis loops.
Trait Implementations§
impl Send for Optimizer
impl Sync for Optimizer
Auto Trait Implementations§
impl !Freeze for Optimizer
impl !RefUnwindSafe for Optimizer
impl !UnwindSafe for Optimizer
impl Unpin for Optimizer
impl UnsafeUnpin for Optimizer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more