2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief lower mode_b operations to something the backend can handle
9 * @author Matthias Braun, Christoph Mallon
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.
15 * After this pass the following holds:
16 * - The only inputs with mode_b are for the Cond node and the Sel input of
18 * - The only nodes producing mode_b are: Proj(Cmp)
20 #ifndef FIRM_LOWER_MODE_B_H
21 #define FIRM_LOWER_MODE_B_H
23 #include "firm_types.h"
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.
30 * Example: Psi(a < 0, 1, 0) => a >> 31
32 * @param irg the firm graph to lower
33 * @param lowered_mode mode that is used to transport 0/1 values
35 void ir_lower_mode_b(ir_graph *irg, ir_mode *lowered_mode);