pub trait LlvmModulePass {
    fn run_pass<'a>(
        &self,
        module: &mut Module<'a>,
        manager: &ModuleAnalysisManager
    ) -> PreservedAnalyses; }
Expand description

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

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 module IR, it should return PreservedAnalyses::None to indicate to the pass manager that all analyses are now invalidated.

Implementors§