Handle multiple control dependencies in a more sophisticated (and correct) way
[libfirm] / ir / opt / escape_ana.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/opt/escape_ana.h
4  * Purpose:     escape analysis and optimization
5  * Author:      Michael Beck
6  * Modified by:
7  * Created:     03.11.2005
8  * CVS-ID:      $Id$
9  * Copyright:   (c) 1999-2005 Universität Karlsruhe
10  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
11  */
12 #ifndef _IR_OPT_ESCAPE_ANA_H_
13 #define _IR_OPT_ESCAPE_ANA_H_
14
15 #include "firm_types.h"
16
17 /**
18  * Do simple and fast escape analysis for one graph.
19  *
20  * @param irg  the graph
21  */
22 void escape_enalysis_irg(ir_graph *irg);
23
24 /**
25  * Do simple and fast escape analysis for all graphs.
26  *
27  * This optimization implements a simple and fast but inexact
28  * escape analysis. Some addresses might be marked as 'escaped' even
29  * if they are not.
30  * The advantage is a low memory footprint and fast speed.
31  *
32  * @param run_scalar_replace  if this flag in non-zero, scalar
33  *                            replacement optimization is run on graphs with removed
34  *                            allocation
35  *
36  * This optimization removes allocation which are not used (rare) and replace
37  * allocation that can be proved dead at the end of the graph which stack variables.
38  *
39  * The creation of stack variable allows scalar replacement to be run only
40  * on those graphs that have been changed.
41  *
42  * This is most effective on Java where no other stack variables exists.
43  */
44 void escape_analysis(int run_scalar_replace);
45
46 #endif /* _IR_OPT_ESCAPE_ANA_H_ */