3 * File name: ir/opt/escape_ana.h
4 * Purpose: escape analysis and optimization
9 * Copyright: (c) 1999-2005 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
12 #ifndef _IR_OPT_ESCAPE_ANA_H_
13 #define _IR_OPT_ESCAPE_ANA_H_
15 #include "firm_types.h"
18 * Do simple and fast escape analysis for one graph.
20 * @param irg the graph
22 void escape_enalysis_irg(ir_graph *irg);
25 * Do simple and fast escape analysis for all graphs.
27 * This optimization implements a simple and fast but inexact
28 * escape analysis. Some addresses might be marked as 'escaped' even
30 * The advantage is a low memory footprint and fast speed.
32 * @param run_scalar_replace if this flag in non-zero, scalar
33 * replacement optimization is run on graphs with removed
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.
39 * The creation of stack variable allows scalar replacement to be run only
40 * on those graphs that have been changed.
42 * This is most effective on Java where no other stack variables exists.
44 void escape_analysis(int run_scalar_replace);
46 #endif /* _IR_OPT_ESCAPE_ANA_H_ */