X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Frta.h;h=bad8b04c5996c19fde72d9941e876dcb412b66c7;hb=58e533a640ff427362877a3d2f1a5142c96391e1;hp=4a5319c44d268dc2a15c4c04ee2ed8c81ae9ee56;hpb=7a4700d9c8fe432f785a480fdb14231061aa2531;p=libfirm diff --git a/ir/ana/rta.h b/ir/ana/rta.h index 4a5319c44..bad8b04c5 100644 --- a/ir/ana/rta.h +++ b/ir/ana/rta.h @@ -1,38 +1,115 @@ /* -*- c -*- */ +/* + * Project: libFIRM + * File name: ir/ana/rta.h + * Purpose: Interprocedural analysis to improve the call graph estimate. + * Author: Florian + * Modified by: + * Created: 09.06.2002 + * CVS-ID: $$ + * Copyright: (c) 1999-2004 Universität Karlsruhe + * Licence: This file is protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ + +/** + * Intraprozedurale Analyse zur Abschätzung der Aufrufrelation. Es wird + * die Menge der instantiierten Klassen bestimmt, und daraus eine Abschätzung + * der aufgerufenen Methoden. + * + * Voraussetzung ist, dass das Programm keine Methodenzeiger handhaben kann. + * In diesem Fall koennten Methoden verloren gehen. Oder wir muessen nach + * allen "freien" Methoden suchen (siehe cgana). + * + * @@@ Die Analyse sollte wissen, von welchen Klassen Instanzen ausserhalb + * der Uebersetzungseinheit alloziert werden koennen. Diese muessen in + * die initiale Menge allozierter Klassen aufgenommern werden. + * + * Nach: David F. Bacon and Peter F. Sweeney, + * Fast static analysis of C++ virtual function calls + * OOPSLA 1996 + */ + #ifndef _RTA_H_ #define _RTA_H_ -#ifdef HAVE_CONFIG_H -# include -#endif +# include "entity.h" -#include -#include "cgana.h" /* get_implementation */ +/** + * Initialise the RTA data structures and perform RTA. + * + * @param do_verbose If == 1, print statistics, if > 1, chatter about every detail + */ +void rta_init(int do_verbose); -#include "eset.h" -/* #include "pmap.h" */ -/* #include "array.h" */ -#include "irprog.h" -#include "irgwalk.h" -/* #include "ircons.h" */ -/* #include "irgmod.h" */ -#include "irnode_t.h" -/* #include "irflag_t.h" */ +/** + * Delete all graphs that have been found to be dead. + */ +void rta_delete_dead_graphs (void); -/* #include "dbginfo_t.h" */ +/** Clean up our data structures. + * Finishes the RTA. + */ +void rta_cleanup(void); + +/** Returns non-zero if the given class is alive. */ +int rta_is_alive_class(ir_type *clazz); -void rta_init (void); -void rta_cleanup (void); +/** Returns non-zero if the given graph is alive. */ +int rta_is_alive_graph(ir_graph *graph); -int rta_is_alive_class (type*); -int rta_is_alive_graph (ir_graph*); -int rta_is_alive_field (entity*); +/** report for all graphs and types whether they are alive */ +void rta_report (void); -#endif /* def _RTA_H_ */ +#endif /* not defined _RTA_H_ */ /* * $Log$ + * Revision 1.14 2006/01/13 21:52:00 beck + * renamed all types 'type' to 'ir_type' + * + * Revision 1.13 2004/10/21 07:23:34 goetz + * comments + * + * Revision 1.12 2004/10/20 14:59:27 liekweg + * Removed ecg + * + * Revision 1.11 2004/10/18 12:47:46 liekweg + * minor fix + * + * Revision 1.10 2004/09/24 13:59:04 beck + * fixed doxygen comments, removed initialization for description entities + * + * Revision 1.9 2004/08/19 16:51:02 goetz + * fixed some errors, pushed closer to inteded firm semantics + * + * Revision 1.8 2004/06/18 17:34:31 liekweg + * Removed field checks --flo + * + * Revision 1.7 2004/06/18 13:12:43 liekweg + * final bug fix (calls via consts) + * + * Revision 1.6 2004/06/17 14:21:14 liekweg + * major bugfix + * + * Revision 1.5 2004/06/17 08:33:01 liekweg + * Added comments; added remove_irg + * + * Revision 1.4 2004/06/15 11:44:54 beck + * New inlining schema implemented: + * + * small functions that should be inlined in libFirm are implemented in _t.h files + * with a __ prefix. + * Preprocessor magic is used to automatically inline these functions whenever a _t.h + * file is included instead of a .h file. + * Note that this magic did not work outside libFirm without accessing _t.h files. + * + * Revision 1.3 2004/06/13 15:03:45 liekweg + * RTA auf Iterative RTA aufgebohrt --flo + * + * Revision 1.2 2004/06/12 17:09:46 liekweg + * RTA works, outedges breaks. "Yay." --flo + * * Revision 1.1 2004/06/11 18:24:18 liekweg * Added RTA --flo *