/*
- * Copyright (C) 1995-2010 University of Karlsruhe. All right reserved.
- *
* This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
*/
/**
ir_prog_pass_mgr_add(mgr, pass);
}
-static void create_suffix(char *suffix, size_t n, const char *pass_name)
-{
- snprintf(suffix, n, "%s.svg", pass_name);
-}
-
int ir_graph_pass_mgr_run(ir_graph_pass_manager_t *mgr)
{
- ir_graph_pass_t *pass;
- size_t i;
- int res = 0;
- ir_graph *rem = current_ir_graph;
+ size_t i;
+ int res = 0;
+ ir_graph *rem = current_ir_graph;
/* on all graphs: beware: number of irgs might be changed */
for (i = 0; i < get_irp_n_irgs(); ++i) {
if (pass->dump_irg) {
pass->dump_irg(irg, pass->context, idx);
} else {
- char buf[1024];
- create_suffix(buf, sizeof(buf), pass->name);
- dump_ir_graph(irg, buf);
+ dump_ir_graph(irg, pass->name);
}
}
++idx;
int ir_prog_pass_mgr_run(ir_prog_pass_manager_t *mgr)
{
- ir_prog_pass_t *pass;
- int res = 0;
+ int res = 0;
/* run every pass on every graph */
unsigned idx = mgr->run_idx;
if (pass->dump_irprog) {
pass->dump_irprog(irp, pass->context, idx);
} else {
- char buf[1024];
- create_suffix(buf, sizeof(buf), pass->name);
- dump_all_ir_graphs(buf);
+ dump_all_ir_graphs(pass->name);
}
}
if (pass->is_wrapper) {
void term_graph_pass_mgr(ir_graph_pass_manager_t *mgr)
{
- ir_graph_pass_t *pass, *next;
-
list_for_each_entry_safe(ir_graph_pass_t, pass, next, &mgr->passes, list) {
if (pass->rem_from_mgr)
pass->rem_from_mgr(pass->context);
void term_prog_pass_mgr(ir_prog_pass_manager_t *mgr)
{
- ir_prog_pass_t *pass, *next;
-
list_for_each_entry_safe(ir_prog_pass_t, pass, next, &mgr->passes, list) {
if (pass->rem_from_mgr)
pass->rem_from_mgr(pass->context);