X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Flibfirm%2Fcgana.h;h=98479ef5d8a0ee15955de034df1543036deef61e;hb=6cd6e689bec4c3090cf54956ff8b8d4e340085ef;hp=e24110d9cf5431d67a8c4fb39ff4df3cbe2230a4;hpb=6f2b3c2901153e4df55ccea111c25d14b0917065;p=libfirm diff --git a/include/libfirm/cgana.h b/include/libfirm/cgana.h index e24110d9c..98479ef5d 100644 --- a/include/libfirm/cgana.h +++ b/include/libfirm/cgana.h @@ -22,7 +22,6 @@ * @brief Intraprozedural analyses to estimate the call graph. * @author Hubert Schmid * @date 09.06.2002 - * @version $Id$ * @brief * Interprocedural analysis to estimate the calling relation. * @@ -35,20 +34,10 @@ #define FIRM_ANA_CGANA_H #include "firm_types.h" +#include "begin.h" -/* Methoden sind "frei", wenn ihr Funktionszeiger (potentiell) - * "explizit" bekannt ist, d.h.: - * - * - die Methode ist von aussen sichtbar (external_visible). - * - * - ihr Funktionszeiger ist "frei", d.h. der Funktionszeiger wurde - * nicht ausschliesslich an den entsprechenden Eingang eines - * Call-Knotens weitergegeben, sondern z.B. in den Speicher - * geschrieben, als Parameter uebergeben, ... - * - * Die main-Methode ist immer in der Menge enthalten. - * - * Die Links an den "ir_node"s werden geloescht. +/** @addtogroup callgraph + * @{ */ /** Analyses a rough estimation of the possible call graph. @@ -71,23 +60,31 @@ * and Craig Chambers. * * Performs some optimizations possible by the analysed information: - * - Replace SymConst-name nodes by SymConst-entity nodes if possible. - * - Replace (Sel-method(Alloc)) by SymConst-entity. - * - Replaces Sel-method by SymConst-entity if the method is never overwritten. + * - Replace SymConst-name nodes by SymConst-entity nodes if possible. + * - Replace (Sel-method(Alloc)) by SymConst-entity. + * - Replaces Sel-method by SymConst-entity if the method is never overwritten. */ -void cgana(int *len, ir_entity ***free_methods); +FIRM_API size_t cgana(ir_entity ***free_methods); -/** Free callee information. +/** + * Frees callee information. * - * Sets callee_info_state of the graph passed to none. Sets callee field - * in all call nodes to NULL. Else it happens that the field contains - * pointers to other than firm arrays. + * Sets callee_info_state of the graph passed to none. Sets callee field + * in all call nodes to NULL. Else it happens that the field contains + * pointers to other than firm arrays. */ -void free_callee_info(ir_graph *irg); -void free_irp_callee_info(void); +FIRM_API void free_callee_info(ir_graph *irg); +/** Frees callee information for all graphs in the current program. */ +FIRM_API void free_irp_callee_info(void); + +/** + * Optimizes the address expressions passed to call nodes. + * Performs only the optimizations done by cgana. + */ +FIRM_API void opt_call_addrs(void); + +/** @} */ -/* Optimize the address expressions passed to call nodes. - * Performs only the optimizations done by cgana. */ -void opt_call_addrs(void); +#include "end.h" #endif