Get an InlineCost object representing the cost of inlining this callsite.

Synopsis

Description

Note that a default threshold is passed into this function. This threshold could be modified based on callsite's properties and only costs below this new threshold are computed with any accuracy. The new threshold can be used to bound the computation necessary to determine whether the cost is sufficiently low to warrant inlining.

Also note that calling this function dynamically computes the cost of inlining the callsite. It is an expensive, heavyweight call.

Return Value

The computed InlineCost for Call.

Parameters

Name

Description

Call

Call site whose inlining cost is computed.

Params

Thresholds and knobs that tune the cost analysis.

CalleeTTI

Target transform info for the callee.

GetAssumptionCache

Callback returning the assumption cache for a function.

GetTLI

Callback returning target library info for a function.

GetBFI

Optional callback returning block frequency info, or null.

PSI

Optional profile summary used for hot/cold callsite thresholds.

ORE

Optional remark emitter for inlining diagnostics.

GetEphValuesCache

Optional callback returning the ephemeral values cache for a function.

Created with MrDocs