pub trait LlvmFunctionAnalysis: Default {
    type Result;

    fn run_analysis<'a>(
        &self,
        module: &FunctionValue<'a>,
        manager: &FunctionAnalysisManager
    ) -> Self::Result; }
Expand description

Trait to use for implementing an analysis pass on an LLVM function.

An analysis pass is not allowed to mutate the LLVM IR.

Required Associated Types

Result of the successful execution of this pass by the pass manager.

This data can be queried by passes through a FunctionAnalysisManager.

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.

The returned result will be moved into a Box before being given to the pass manager. This one will then add it to its internal cache, to avoid unnecessary calls to this entrypoint.

Implementors