llvm::shouldOptimizeForSizeImpl

Returns true if a basic block (or its frequency) is suggested to be size-optimized based on the profile.

Synopsis

Declared in <llvm/Transforms/Utils/SizeOpts.h>

template<
    typename BlockTOrBlockFreq,
    typename BFIT>
bool
shouldOptimizeForSizeImpl(
    BlockTOrBlockFreq BBOrBlockFreq,
    ProfileSummaryInfo* PSI,
    BFIT* BFI,
    PGSOQueryType QueryType);

Return Value

True if the block should be optimized for size.

Parameters

NameDescription
BBOrBlockFreqThe basic block or block frequency to consider.
PSIProfile summary information used to classify hot/cold code.
BFIBlock frequency information for the enclosing function.
QueryTypeThe caller context of this size-optimization query.