becopyopt: Inline the thin wrapper nodes_interfere(), so we do not need to fetch...
[libfirm] / include / libfirm / irconsconfirm.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief    Construction of Confirm nodes
9  * @author   Michael Beck
10  * @date     6.2005
11  */
12 #ifndef FIRM_ANA_IRCONSCONFIRM_H
13 #define FIRM_ANA_IRCONSCONFIRM_H
14
15 #include "firm_types.h"
16 #include "begin.h"
17
18 /**
19  * Inject Confirm nodes into a graph.
20  *
21  * @param irg  the graph
22  *
23  * Confirm nodes carry confirmation information, such as
24  * a relation between a value a and another value (or a constant)
25  * b.
26  *
27  * These allows to do some range dependent optimizations for Cmp,
28  * Abs, Min, Max nodes as well as bounds checking deletion.
29  *
30  * The heap analysis might profit also. On the other side, Confirm
31  * nodes disturb local optimizations, because patterns are destroyed.
32  *
33  * It is possible to avoid this by skipping Confirm nodes, but this
34  * is not implemented and is not cheap. The same happens with Casts
35  * nodes too. The current solution is to remove Confirms at a later
36  * pass.
37  */
38 FIRM_API void construct_confirms(ir_graph *irg);
39
40 /**
41  * Creates an ir_graph pass for construct_confirms().
42  *
43  * @param name     the name of this pass or NULL
44  *
45  * @return  the newly created ir_graph pass
46  */
47 FIRM_API ir_graph_pass_t *construct_confirms_pass(const char *name);
48
49 /**
50  * Remove all Confirm nodes from a graph.
51  *
52  * Note that local_optimize() can handle this if
53  * the remove Confirm node setting is on (set_opt_remove_Confirm(1)).
54  */
55 FIRM_API void remove_confirms(ir_graph *irg);
56
57 /**
58  * Creates an ir_graph pass for remove_confirms().
59  *
60  * @param name     the name of this pass or NULL
61  *
62  * @return  the newly created ir_graph pass
63  */
64 FIRM_API ir_graph_pass_t *remove_confirms_pass(const char *name);
65
66 #include "end.h"
67
68 #endif