Struct spirv_tools::opt::compiled::CompiledOptimizer
source · [−]pub struct CompiledOptimizer { /* private fields */ }
Trait Implementations
sourceimpl Default for CompiledOptimizer
impl Default for CompiledOptimizer
sourceimpl Drop for CompiledOptimizer
impl Drop for CompiledOptimizer
sourceimpl Optimizer for CompiledOptimizer
impl Optimizer for CompiledOptimizer
sourcefn register_pass(&mut self, pass: Passes) -> &mut Self
fn register_pass(&mut self, pass: Passes) -> &mut Self
Register a single pass with the the optimizer.
sourcefn register_performance_passes(&mut self) -> &mut Self
fn register_performance_passes(&mut self) -> &mut Self
Registers passes that attempt to improve performance of generated code. This sequence of passes is subject to constant review and will change from time to time.
sourcefn register_size_passes(&mut self) -> &mut Self
fn register_size_passes(&mut self) -> &mut Self
Registers passes that attempt to improve the size of generated code. This sequence of passes is subject to constant review and will change from time to time.
sourcefn register_hlsl_legalization_passes(&mut self) -> &mut Self
fn register_hlsl_legalization_passes(&mut self) -> &mut Self
Registers passes that attempt to legalize the generated code.
Note: this recipe is specially designed for legalizing SPIR-V. It should be used by compilers after translating HLSL source code literally. It should not be used by general workloads for performance or size improvement.
This sequence of passes is subject to constant review and will change from time to time.
fn with_env(target: TargetEnv) -> Self
fn optimize<MC: MessageCallback>(
&self,
input: impl AsRef<[u32]>,
msg_callback: &mut MC,
options: Option<Options>
) -> Result<Binary, Error>
Auto Trait Implementations
impl RefUnwindSafe for CompiledOptimizer
impl !Send for CompiledOptimizer
impl !Sync for CompiledOptimizer
impl Unpin for CompiledOptimizer
impl UnwindSafe for CompiledOptimizer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more