2 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
6 * This file may be distributed and/or modified under the terms of the
7 * GNU General Public License version 2 as published by the Free Software
8 * Foundation and appearing in the file LICENSE.GPL included in the
9 * packaging of this file.
11 * Licensees holding valid libFirm Professional Edition licenses may use
12 * this file in accordance with the libFirm Commercial License.
13 * Agreement provided with the Software.
15 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * @brief Interprocedural analysis to improve the call graph estimate.
27 * (TODO translate to english)
28 * Intraprozedurale Analyse zur Absch�tzung der Aufrufrelation. Es wird
29 * die Menge der instantiierten Klassen bestimmt, und daraus eine Absch�tzung
30 * der aufgerufenen Methoden.
32 * Voraussetzung ist, dass das Programm keine Methodenzeiger handhaben kann.
33 * In diesem Fall koennten Methoden verloren gehen. Oder wir muessen nach
34 * allen "freien" Methoden suchen (siehe cgana).
36 * @@@ Die Analyse sollte wissen, von welchen Klassen Instanzen ausserhalb
37 * der Uebersetzungseinheit alloziert werden koennen. Diese muessen in
38 * die initiale Menge allozierter Klassen aufgenommern werden.
40 * Nach: David F. Bacon and Peter F. Sweeney,
41 * Fast static analysis of C++ virtual function calls
44 #ifndef FIRM_ANA_RTA_H
45 #define FIRM_ANA_RTA_H
47 #include "firm_types.h"
52 * Initialise the RTA data structures and perform RTA.
53 * Expects that all allocations are done by Alloc nodes.
55 FIRM_API void rta_init(void);
58 * Delete all graphs that have been found to be dead.
60 FIRM_API void rta_delete_dead_graphs (void);
62 /** Clean up our data structures.
65 FIRM_API void rta_cleanup(void);
67 /** Returns non-zero if the given class is alive. */
68 FIRM_API int rta_is_alive_class(ir_type *clazz);
70 /** Returns non-zero if the given graph is alive. */
71 FIRM_API int rta_is_alive_graph(ir_graph *graph);
73 /** report for all graphs and types whether they are alive */
74 FIRM_API void rta_report(void);