libFirm
Basic Block Execution Frequency

Execution frequencies specify how often a basic block is expected to get executed during execution of a function. More...

Functions

void ir_estimate_execfreq (ir_graph *irg)
 Estimates execution frequency of a graph. More...
 
double get_block_execfreq (const ir_node *block)
 Returns execution frequency of block block. More...
 

Detailed Description

Execution frequencies specify how often a basic block is expected to get executed during execution of a function.

For example the start block has a natural execution frequency of 1.0, the two branches of a simple if 0.5, nodes in a simple loop 10.0 ... Execution frequencies can either get estimated based on the structure of the control flow graph or can be calculated based on profile information.

Function Documentation

◆ get_block_execfreq()

double get_block_execfreq ( const ir_node block)

Returns execution frequency of block block.

◆ ir_estimate_execfreq()

void ir_estimate_execfreq ( ir_graph irg)

Estimates execution frequency of a graph.

You can query the frequencies with get_block_execfreq().