X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Flibfirm%2Firgopt.h;h=169931d4fd0027ed50aa0ffd2242fa5c1d78cb3e;hb=2624fd65233bcb621cfbbf7dae1a1502a3d8bc75;hp=6dc97e53bf19742d5515bd865b56b8a03fc5b242;hpb=c021732d2f0c04113e6afd153a7a9be38e40ca6f;p=libfirm diff --git a/include/libfirm/irgopt.h b/include/libfirm/irgopt.h index 6dc97e53b..169931d4f 100644 --- a/include/libfirm/irgopt.h +++ b/include/libfirm/irgopt.h @@ -21,7 +21,6 @@ * @file * @brief Optimizations for a whole ir graph, i.e., a procedure. * @author Christian Schaefer, Goetz Lindenmaier, Sebastian Felis - * @version $Id$ */ #ifndef FIRM_IR_IRGOPT_H #define FIRM_IR_IRGOPT_H @@ -29,12 +28,18 @@ #include "firm_types.h" #include "begin.h" +/** + * @ingroup iroptimize + * @defgroup irgopt Graph Transformations + * @{ + */ + /** Applies local optimizations (see iropt.h) to all nodes reachable from node * @p n. * * @param n The node to be optimized. */ -FIRM_DLL void local_optimize_node(ir_node *n); +FIRM_API void local_optimize_node(ir_node *n); /** Applies local optimizations (see iropt.h) to all nodes in the graph. * @@ -43,7 +48,7 @@ FIRM_DLL void local_optimize_node(ir_node *n); * After applying local_optimize_graph() to a IR-graph, Bad nodes * only occur as predecessor of Block and Phi nodes. */ -FIRM_DLL void local_optimize_graph(ir_graph *irg); +FIRM_API void local_optimize_graph(ir_graph *irg); /** Applies local optimizations (see iropt.h) to all nodes in the graph. * @@ -56,7 +61,31 @@ FIRM_DLL void local_optimize_graph(ir_graph *irg); * * @return non-zero if the optimization could be applied, 0 else */ -FIRM_DLL int optimize_graph_df(ir_graph *irg); +FIRM_API void local_opts(ir_graph *irg); + +/** Same functionality as local_opts above, but without framework wrapper + * @deprecated + */ +FIRM_API int optimize_graph_df(ir_graph *irg); + +/** + * Eliminates (obviously) unreachable code + */ +FIRM_API void remove_unreachable_code(ir_graph *irg); + +/** + * Removes all Bad nodes from a graph. + * + * @param irg The graph to be optimized. + */ +FIRM_API void remove_bads(ir_graph *irg); + +/** + * Removes all Tuple nodes from a graph. + * + * @param irg The graph to be optimized. + */ +FIRM_API void remove_tuples(ir_graph *irg); /** * Creates an ir_graph pass for optimize_graph_df(). @@ -65,7 +94,7 @@ FIRM_DLL int optimize_graph_df(ir_graph *irg); * * @return the newly created ir_graph pass */ -FIRM_DLL ir_graph_pass_t *optimize_graph_df_pass(const char *name); +FIRM_API ir_graph_pass_t *optimize_graph_df_pass(const char *name); /** Places an empty basic block on critical control flow edges thereby * removing them. @@ -76,7 +105,7 @@ FIRM_DLL ir_graph_pass_t *optimize_graph_df_pass(const char *name); * * @param irg IR Graph */ -FIRM_DLL void remove_critical_cf_edges(ir_graph *irg); +FIRM_API void remove_critical_cf_edges(ir_graph *irg); /** Places an empty basic block on critical control flow edges thereby * removing them. @@ -88,9 +117,11 @@ FIRM_DLL void remove_critical_cf_edges(ir_graph *irg); * @param irg IR Graph * @param ignore_exception_edges if non-zero, exception edges will be ignored */ -FIRM_DLL void remove_critical_cf_edges_ex(ir_graph *irg, +FIRM_API void remove_critical_cf_edges_ex(ir_graph *irg, int ignore_exception_edges); +/** @} */ + #include "end.h" #endif