summaryrefslogtreecommitdiffhomepage
path: root/ir/ana/execfreq_t.h
blob: 0ac1f9fe052909c9641aa96d715db281c47095c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * This file is part of libFirm.
 * Copyright (C) 2012 University of Karlsruhe.
 */

/**
 * @file
 * @brief       Compute an estimate of basic block executions.
 * @author      Adam M. Szalkowski
 * @date        28.05.2006
 */
#ifndef FIRM_ANA_EXECFREQ_T_H
#define FIRM_ANA_EXECFREQ_T_H

#include "execfreq.h"

void init_execfreq(void);

void exit_execfreq(void);

void set_block_execfreq(ir_node *block, double freq);

typedef struct ir_execfreq_int_factors {
	double min_non_zero;
	double m;
	double b;
} ir_execfreq_int_factors;

void ir_calculate_execfreq_int_factors(ir_execfreq_int_factors *factors,
                                       ir_graph *irg);

int get_block_execfreq_int(const ir_execfreq_int_factors *factors,
                           const ir_node *block);

#endif