fixed CRLF
[libfirm] / ir / ana / rta.h
1 /* -*- c -*- */
2
3 /*
4  * Project:     libFIRM
5  * File name:   ir/ana/rta.h
6  * Purpose:     Interprocedural analysis to improve the call graph estimate.
7  * Author:      Florian
8  * Modified by:
9  * Created:     09.06.2002
10  * CVS-ID:      $$
11  * Copyright:   (c) 1999-2004 Universität Karlsruhe
12  * Licence:     This file is protected by GPL -  GNU GENERAL PUBLIC LICENSE.
13  */
14
15 /**
16  * Intraprozedurale Analyse zur Abschätzung der Aufrufrelation. Es wird
17  * die Menge der instantiierten Klassen bestimmt, und daraus eine Abschätzung
18  * der aufgerufenen Methoden.
19  *
20  * Voraussetzung ist, dass das Programm keine Methodenzeiger handhaben kann.
21  * In diesem Fall koennten Methoden verloren gehen.  Oder wir muessen nach
22  * allen "freien" Methoden suchen (siehe cgana).
23  *
24  * @@@ Die Analyse sollte wissen, von welchen Klassen Instanzen ausserhalb
25  * der Uebersetzungseinheit alloziert werden koennen.  Diese muessen in
26  * die initiale Menge allozierter Klassen aufgenommern werden.
27  *
28  * Nach: David F. Bacon and Peter F. Sweeney,
29  *       Fast static analysis of C++ virtual function calls
30  *       OOPSLA 1996
31  */
32
33 #ifndef _RTA_H_
34 #define _RTA_H_
35
36 # include "entity.h"
37
38 /**
39  * Initialise the RTA data structures and perform RTA.
40  *
41  * @param do_verbose If == 1, print statistics, if > 1, chatter about every detail
42  */
43 void rta_init(int do_verbose);
44
45 /**
46  * Delete all graphs that have been found to be dead.
47  */
48 void rta_delete_dead_graphs (void);
49
50 /** Clean up our data structures.
51  * Finishes the RTA.
52  */
53 void rta_cleanup(void);
54
55 /** Returns non-zero if the given class is alive. */
56 int rta_is_alive_class(ir_type *clazz);
57
58 /** Returns non-zero if the given graph is alive. */
59 int rta_is_alive_graph(ir_graph *graph);
60
61 /** report for all graphs and types whether they are alive */
62 void rta_report (void);
63
64 #endif /* not defined _RTA_H_ */
65
66 /*
67  * $Log$
68  * Revision 1.14  2006/01/13 21:52:00  beck
69  * renamed all types 'type' to 'ir_type'
70  *
71  * Revision 1.13  2004/10/21 07:23:34  goetz
72  * comments
73  *
74  * Revision 1.12  2004/10/20 14:59:27  liekweg
75  * Removed ecg
76  *
77  * Revision 1.11  2004/10/18 12:47:46  liekweg
78  * minor fix
79  *
80  * Revision 1.10  2004/09/24 13:59:04  beck
81  * fixed doxygen comments, removed initialization for description entities
82  *
83  * Revision 1.9  2004/08/19 16:51:02  goetz
84  * fixed some errors, pushed closer to inteded firm semantics
85  *
86  * Revision 1.8  2004/06/18 17:34:31  liekweg
87  * Removed field checks --flo
88  *
89  * Revision 1.7  2004/06/18 13:12:43  liekweg
90  * final bug fix (calls via consts)
91  *
92  * Revision 1.6  2004/06/17 14:21:14  liekweg
93  * major bugfix
94  *
95  * Revision 1.5  2004/06/17 08:33:01  liekweg
96  * Added comments; added remove_irg
97  *
98  * Revision 1.4  2004/06/15 11:44:54  beck
99  * New inlining schema implemented:
100  *
101  * small functions that should be inlined in libFirm are implemented in _t.h files
102  * with a __ prefix.
103  * Preprocessor magic is used to automatically inline these functions whenever a _t.h
104  * file is included instead of a .h file.
105  * Note that this magic did not work outside libFirm without accessing _t.h files.
106  *
107  * Revision 1.3  2004/06/13 15:03:45  liekweg
108  * RTA auf Iterative RTA aufgebohrt --flo
109  *
110  * Revision 1.2  2004/06/12 17:09:46  liekweg
111  * RTA works, outedges breaks.  "Yay." --flo
112  *
113  * Revision 1.1  2004/06/11 18:24:18  liekweg
114  * Added RTA --flo
115  *
116  */