becopyopt: Inline the thin wrapper nodes_interfere(), so we do not need to fetch...
[libfirm] / include / libfirm / execfreq.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief       Compute an estimate of basic block executions.
9  * @author      Adam M. Szalkowski
10  * @date        28.05.2006
11  */
12 #ifndef FIRM_ANA_EXECFREQ_H
13 #define FIRM_ANA_EXECFREQ_H
14
15 #include "firm_types.h"
16 #include "begin.h"
17
18 /**
19  * @ingroup irana
20  * @defgroup execfreq Basic Block Execution Frequency
21  *
22  * Execution frequencies specify how often a basic block is expected to get
23  * executed during execution of a function.
24  * For example the start block has a natural execution frequency of 1.0, the
25  * two branches of a simple if 0.5, nodes in a simple loop 10.0 ...
26  * Execution frequencies can either get estimated based on the structure of the
27  * control flow graph or can be calculated based on profile information.
28  * @{
29  */
30
31 /** Estimates execution frequency of a graph.
32  * You can query the frequencies with get_block_execfreq().
33  */
34 FIRM_API void ir_estimate_execfreq(ir_graph *irg);
35
36 /** Returns execution frequency of block @p block. */
37 FIRM_API double get_block_execfreq(const ir_node *block);
38
39 /** @} */
40
41 #include "end.h"
42
43 #endif