[−][src]Trait llhd::opt::Pass
An optimization pass.
The optimization infrastructure will always call run_on_module()
. However,
implementors of the trait should override the function at their desired
level of granularity. The Pass
trait provides a sane default for all
run_*()
functions.
Provided methods
fn run_on_module(ctx: &PassContext, module: &mut Module) -> bool
Run this pass on an entire module.
fn run_on_function(ctx: &PassContext, func: &mut FunctionBuilder) -> bool
Run this pass on an entire function.
fn run_on_process(ctx: &PassContext, prok: &mut ProcessBuilder) -> bool
Run this pass on an entire process.
fn run_on_entity(ctx: &PassContext, entity: &mut EntityBuilder) -> bool
Run this pass on an entire entity.
fn run_on_cfg(ctx: &PassContext, unit: &mut impl UnitBuilder) -> bool
Run this pass on an entire function or process.
fn run_on_inst(
ctx: &PassContext,
inst: Inst,
unit: &mut impl UnitBuilder
) -> bool
ctx: &PassContext,
inst: Inst,
unit: &mut impl UnitBuilder
) -> bool
Run this pass on an instruction.
Implementors
impl Pass for ConstFolding
[src]
fn run_on_inst(
_ctx: &PassContext,
inst: Inst,
unit: &mut impl UnitBuilder
) -> bool
[src]
_ctx: &PassContext,
inst: Inst,
unit: &mut impl UnitBuilder
) -> bool