fixed doxygen output
[libfirm] / ir / opt / ifconv.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/opt/ifconv.h
4  * Purpose:     If conversion.
5  * Author:      Sebastian Hack.
6  * Created:
7  * CVS-ID:      $Id$
8  * Copyright:   (c) 1998-2005 Universität Karlsruhe
9  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
10  */
11 #ifndef _FIRM_IF_CONV_H
12 #define _FIRM_IF_CONV_H
13
14 /**
15  * @file ifconv.h
16  *
17  * If conversion.
18  * @author Sebastian Hack
19  * @date 10.2.2005
20  */
21 #include "irnode.h"
22
23 /**
24  * This function is called to evaluate, if a mux can build
25  * of the current architecture.
26  * If it returns non-zero, a mux is created, else the code
27  * is not modified.
28  * @param sel        A selector of a Cond.
29  * @param phi_list   List of Phi nodes about to be converted (linked via link field)
30  * @param i          First data predecessor involved in if conversion
31  * @param j          Second data predecessor involved in if conversion
32  */
33 typedef int (*arch_allow_ifconv_func)(ir_node *sel, ir_node* phi_list, int i, int j);
34
35 /**
36  * The parameters structure.
37  */
38 typedef struct _opt_if_conv_info_t {
39   int                 max_depth;    /**< The maximum depth up to which expressions
40                                          are examined when it has to be decided if they
41                                          can be placed into another block. */
42   arch_allow_ifconv_func allow_ifconv; /**< Evaluator function, if not set all possible Psi
43                                          nodes will be created. */
44 } opt_if_conv_info_t;
45
46 /**
47  * Perform If conversion on a graph.
48  *
49  * @param irg The graph.
50  * @param params The parameters for the if conversion.
51  *
52  * Cannot handle blocks with Bad control predecessors, so call it after control
53  * flow optimization.
54  */
55 void opt_if_conv(ir_graph *irg, const opt_if_conv_info_t *params);
56
57 #endif /* _FIRM_IF_CONV_H */