LLVMRustOptimize in rustc_codegen_llvm::llvm::ffi - Rust
Description: API documentation for the Rust `LLVMRustOptimize` fn in crate `rustc_codegen_llvm`.

Skip to main content

## LLVMRustOptimize

# Function LLVMRustOptimize

Source

    pub(crate) unsafe extern "C" fn LLVMRustOptimize<'a>(
        M: &'a Module,
        TM: &'a TargetMachine,
        OptLevel: PassBuilderOptLevel,
        OptStage: OptStage,
        IsLinkerPluginLTO: bool,
        NoPrepopulatePasses: bool,
        VerifyIR: bool,
        LintIR: bool,
        ThinLTOBuffer: Option<&mut Option<Buffer>>,
        ThinLTOSummaryBuffer: Option<&mut Option<Buffer>>,
        MergeFunctions: bool,
        UnrollLoops: bool,
        SLPVectorize: bool,
        LoopVectorize: bool,
        DisableSimplifyLibCalls: bool,
        EmitLifetimeMarkers: bool,
        RunEnzyme: *const c_void,
        PrintBeforeEnzyme: bool,
        PrintAfterEnzyme: bool,
        PrintPasses: bool,
        SanitizerOptions: Option<&SanitizerOptions>,
        PGOGenPath: *const c_char,
        PGOUsePath: *const c_char,
        InstrumentCoverage: bool,
        InstrProfileOutput: *const c_char,
        PGOSampleUsePath: *const c_char,
        DebugInfoForProfiling: bool,
        llvm_selfprofiler: *mut c_void,
        begin_callback: unsafe extern "C" fn(*mut c_void, *const c_char, *const c_char),
        end_callback: unsafe extern "C" fn(*mut c_void),
        ExtraPasses: *const c_char,
        ExtraPassesLen: size_t,
        LLVMPlugins: *const c_char,
        LLVMPluginsLen: size_t,
    ) -> LLVMRustResult