beifg: Simplify the quite complicated way to divide a number by 2 in be_ifg_stat().
[libfirm] / ir / lower / lower_mode_b.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief       lower mode_b operations to something the backend can handle
9  * @author      Matthias Braun, Christoph Mallon
10  *
11  * Most machines can't really manipulate mode_b values (which are usually
12  * modeled as cpu flags). So you often have to convert them into machine words
13  * with the values 0/1 and operate on them instead.
14  *
15  * After this pass the following holds:
16  *   - The only inputs with mode_b are for the Cond node and the Sel input of
17  *     a Mux node.
18  *   - The only nodes producing mode_b are: Proj(Cmp)
19  */
20 #ifndef FIRM_LOWER_MODE_B_H
21 #define FIRM_LOWER_MODE_B_H
22
23 #include "firm_types.h"
24
25 /**
26  * Lowers mode_b operations to integer arithmetic. After the lowering the only
27  * operations with mode_b are the Projs of Cmps; the only nodes with mode_b
28  * inputs are Cond and Psi nodes.
29  *
30  * Example: Psi(a < 0, 1, 0) => a >> 31
31  *
32  * @param irg           the firm graph to lower
33  * @param lowered_mode  mode that is used to transport 0/1 values
34  */
35 void ir_lower_mode_b(ir_graph *irg, ir_mode *lowered_mode);
36
37 #endif