Trait llvm_plugin::LlvmFunctionPass
source · pub trait LlvmFunctionPass {
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§
sourcefn run_pass<'a>(
&self,
function: &mut FunctionValue<'a>,
manager: &FunctionAnalysisManager
) -> PreservedAnalyses
fn run_pass<'a>(
&self,
function: &mut FunctionValue<'a>,
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.