ΒΆllvm::ModuleSummaryIndex buildModuleSummaryIndex(
    const llvm::Module& M,
    std::function<BlockFrequencyInfo*(
        const Function&)> GetBFICallback,
    llvm::ProfileSummaryInfo* PSI,
    std::function<const StackSafetyInfo*(
        const Function&)> GetSSICallback =
        [](const llvm::Function& F)
        -> const llvm::StackSafetyInfo* {
      return nullptr;
    })

Description

Direct function to compute a \c ModuleSummaryIndex from a given module. If operating within a pass manager which has defined ways to compute the \c BlockFrequencyInfo for a given function, that can be provided via a std::function callback. Otherwise, this routine will manually construct that information.

Declared at: llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h:36

Parameters

const llvm::Module& M
std::function<BlockFrequencyInfo*( const Function&)> GetBFICallback
llvm::ProfileSummaryInfo* PSI
std::function<const StackSafetyInfo*( const Function&)> GetSSICallback = [](const llvm::Function &F) -> const llvm::StackSafetyInfo * { return nullptr; }