only "firm_types.h" needed
[libfirm] / ir / ana / irconsconfirm.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/ana/irconsconfirm.h
4  * Purpose:     Construction of Confirm nodes
5  * Author:      Michael Beck
6  * Modified by:
7  * Created:     6.2005
8  * CVS-ID:      $Id$
9  * Copyright:   (C) 2002-2005 University of Karlsruhe
10  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
11  */
12
13 /**
14  * @file irconsconfirm.h
15  *
16  *  Construction of Confirm nodes
17  *
18  *  @author Michael Beck
19  */
20 #ifndef _FIRM_ANA_IRCONSCONFIRM_H_
21 #define _FIRM_ANA_IRCONSCONFIRM_H_
22
23 #include "firm_types.h"
24
25 /*
26  * Inject Confirm nodes into a graph.
27  *
28  * @param irg  the graph
29  *
30  * Confirm nodes carry confirmation information, such as
31  * a relation between a value a and another value (or a constant)
32  * b.
33  *
34  * These allows to do some range dependent optimizations for Cmp,
35  * Abs, Min, Max nodes as well as bounds checking deletion.
36  *
37  * The heap analysis might profit also. On the other side, Confirm
38  * nodes disturb local optimizations, because patterns are destroyed.
39  *
40  * It is possible to avoid this by skipping Confirm nodes, but this
41  * is not implemented and is not cheap. The same happens with Casts
42  * nodes too. The current solution is to remove Confirms at a later
43  * pass.
44  */
45 void construct_confirms(ir_graph *irg);
46
47 /**
48  * Remove all Confirm nodes from a graph.
49  *
50  * Note that local_optimize() can handle this if
51  * the remove Confirm node setting is on (set_opt_remove_Confirm(1)).
52  */
53 void remove_confirms(ir_graph *irg);
54
55 #endif /* _FIRM_ANA_IRCONSCONFIRM_H_ */