Indices of heuristic inline‐cost feature summands.

Synopsis

Declared in <llvm/Analysis/InlineModelFeatureMaps.h>

enum class InlineCostFeatureIndex : size_t;

Description

A "cost" feature is a summand of the heuristic‐based inline cost. These indices are defined separately from other ML features to preserve the original heuristic behavior. Values match INLINE_COST_FEATURE_ITERATOR order (comments cannot live inside that X‐macro).

Members

Name

Description

sroa_savings

Savings from SROA (scalar replacement of aggregates).

sroa_losses

Losses from SROA (scalar replacement of aggregates).

load_elimination

Cost of load elimination in the call.

call_penalty

Accumulation of penalty applied to call sites when inlining.

call_argument_setup

Accumulation of call argument setup costs.

load_relative_intrinsic

Accumulation of costs of loading relative intrinsics.

lowered_call_arg_setup

Accumulation of cost of lowered call argument setups.

indirect_call_penalty

Accumulation of costs for indirect calls.

jump_table_penalty

Accumulation of costs for jump tables.

case_cluster_penalty

Accumulation of costs for case clusters.

switch_default_dest_penalty

Accumulation of costs for switch default destination.

switch_penalty

Accumulation of costs for switch statements.

unsimplified_common_instructions

Costs from unsimplified common instructions.

num_loops

Number of loops in the caller.

dead_blocks

Number of dead blocks in the caller.

simplified_instructions

Number of simplified instructions.

constant_args

Number of constant arguments in the call site.

constant_offset_ptr_args

Number of constant offset pointer args in the call site.

callsite_cost

Estimated cost of the call site.

cold_cc_penalty

Penalty for a cold calling convention.

last_call_to_static_bonus

Bonus for being the last call to static.

is_multiple_blocks

Boolean; is the callee multiple blocks.

nested_inlines

Would the default inliner perform nested inlining.

nested_inline_cost_estimate

Estimate of the accumulated cost of nested inlines.

threshold

Threshold for the heuristic inliner.

NumberOfFeatures

Count of cost features; not itself a feature index.

Non-Member Functions

Name

Description

inlineCostFeatureToMlFeature

Map an inline‐cost feature index to the corresponding ML feature index.

isHeuristicInlineCostFeature

Return true if Feature contributes to the heuristic inline cost.

Created with MrDocs