pub trait LlvmFunctionPass {
    // Required method
    fn run_pass(
        &self,
        function: &mut FunctionValue<'_>,
        manager: &FunctionAnalysisManager
    ) -> PreservedAnalyses;
}
Expand description

Trait to use for implementing a transformation pass on an LLVM function.

A transformation pass is allowed to mutate the LLVM IR.

Required Methods§

source

fn run_pass( &self, function: &mut FunctionValue<'_>, manager: &FunctionAnalysisManager ) -> PreservedAnalyses

Entrypoint for the pass.

The given analysis manager allows the pass to query the pass manager for the result of specific analysis passes.

If this function makes modifications on the given function IR, it should return PreservedAnalyses::None to indicate to the pass manager that all analyses are now invalidated.

Implementors§