libFirm 1.20
|
00001 /* 00002 * Copyright (C) 1995-2009 University of Karlsruhe. All right reserved. 00003 * 00004 * This file is part of libFirm. 00005 * 00006 * This file may be distributed and/or modified under the terms of the 00007 * GNU General Public License version 2 as published by the Free Software 00008 * Foundation and appearing in the file LICENSE.GPL included in the 00009 * packaging of this file. 00010 * 00011 * Licensees holding valid libFirm Professional Edition licenses may use 00012 * this file in accordance with the libFirm Commercial License. 00013 * Agreement provided with the Software. 00014 * 00015 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00016 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00017 * PURPOSE. 00018 */ 00019 00025 #ifndef FIRM_IR_PASS_H 00026 #define FIRM_IR_PASS_H 00027 00028 #include "firm_types.h" 00029 #include "begin.h" 00030 00040 FIRM_API ir_graph_pass_manager_t *new_graph_pass_mgr(const char *name, 00041 int verify_all, 00042 int dump_all); 00043 00050 FIRM_API void ir_graph_pass_mgr_add(ir_graph_pass_manager_t *mgr, 00051 ir_graph_pass_t *pass); 00052 00060 FIRM_API int ir_graph_pass_mgr_run(ir_graph_pass_manager_t *mgr); 00061 00067 FIRM_API void term_graph_pass_mgr(ir_graph_pass_manager_t *mgr); 00068 00078 FIRM_API ir_prog_pass_manager_t *new_prog_pass_mgr(const char *name, 00079 int verify_all, 00080 int dump_all); 00081 00088 FIRM_API void ir_prog_pass_mgr_add(ir_prog_pass_manager_t *mgr, 00089 ir_prog_pass_t *pass); 00090 00097 FIRM_API void ir_prog_pass_mgr_add_graph_mgr(ir_prog_pass_manager_t *mgr, 00098 ir_graph_pass_manager_t *graph_mgr); 00099 00106 FIRM_API void ir_prog_pass_mgr_add_graph_pass(ir_prog_pass_manager_t *mgr, 00107 ir_graph_pass_t *pass); 00108 00116 FIRM_API int ir_prog_pass_mgr_run(ir_prog_pass_manager_t *mgr); 00117 00123 FIRM_API void term_prog_pass_mgr(ir_prog_pass_manager_t *mgr); 00124 00131 FIRM_API void ir_graph_pass_mgr_set_run_idx( 00132 ir_graph_pass_manager_t *mgr, unsigned run_idx); 00133 00144 FIRM_API ir_graph_pass_t *def_graph_pass( 00145 const char *name, void (*function)(ir_graph *irg)); 00146 00157 FIRM_API ir_graph_pass_t *def_graph_pass_ret( 00158 const char *name, int (*function)(ir_graph *irg)); 00159 00171 FIRM_API ir_graph_pass_t *def_graph_pass_constructor( 00172 ir_graph_pass_t *memory, 00173 const char *name, int (*function)(ir_graph *irg, void *context)); 00174 00183 FIRM_API void ir_graph_pass_set_parallel(ir_graph_pass_t *pass, int flag); 00184 00195 FIRM_API ir_prog_pass_t *def_prog_pass( 00196 const char *name, void (*function)(void)); 00197 00209 FIRM_API ir_prog_pass_t *def_prog_pass_constructor( 00210 ir_prog_pass_t *memory, 00211 const char *name, int (*function)(ir_prog *irp, void *context)); 00212 00223 FIRM_API ir_prog_pass_t *call_function_pass( 00224 const char *name, void (*function)(void *context), void *context); 00225 00232 FIRM_API void ir_prog_pass_mgr_set_run_idx( 00233 ir_prog_pass_manager_t *mgr, unsigned run_idx); 00234 00235 #include "end.h" 00236 00237 #endif