pub trait LlvmFunctionPass: Default {
    fn run_pass<'a>(
        &self,
        function: &mut FunctionValue<'a>,
        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

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