projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
backend: put ignore regs into beirg
[libfirm]
/
ir
/
ir
/
irpass.c
diff --git
a/ir/ir/irpass.c
b/ir/ir/irpass.c
index
b96a94c
..
adc75a8
100644
(file)
--- a/
ir/ir/irpass.c
+++ b/
ir/ir/irpass.c
@@
-31,7
+31,7
@@
#include "irgraph_t.h"
#include "irprog_t.h"
#include "irdump.h"
#include "irgraph_t.h"
#include "irprog_t.h"
#include "irdump.h"
-#include "irv
r
fy.h"
+#include "irv
eri
fy.h"
#include "xmalloc.h"
/*Add a graph pass to a graph pass manager. */
#include "xmalloc.h"
/*Add a graph pass to a graph pass manager. */
@@
-157,12
+157,9
@@
void ir_prog_pass_mgr_add_graph_mgr(
ir_prog_pass_mgr_add(mgr, pass);
}
ir_prog_pass_mgr_add(mgr, pass);
}
-/**
- * Create a suffix for dumping.
- */
-void create_suffix(char *suffix, size_t n, const char *pass_name, unsigned index)
+static void create_suffix(char *suffix, size_t n, const char *pass_name)
{
{
- snprintf(suffix, n, "
-%02u_%s", index
, pass_name);
+ snprintf(suffix, n, "
%s.svg"
, pass_name);
}
/* Run all passes of an ir_graph pass manager. */
}
/* Run all passes of an ir_graph pass manager. */
@@
-194,9
+191,9
@@
int ir_graph_pass_mgr_run(ir_graph_pass_manager_t *mgr)
if (pass->dump_irg) {
pass->dump_irg(irg, pass->context, idx);
} else {
if (pass->dump_irg) {
pass->dump_irg(irg, pass->context, idx);
} else {
- char
suffix
[1024];
- create_suffix(
suffix, sizeof(suffix), pass->name, idx
);
- dump_ir_
block_graph(irg, suffix
);
+ char
buf
[1024];
+ create_suffix(
buf, sizeof(buf), pass->name
);
+ dump_ir_
graph(irg, buf
);
}
}
++idx;
}
}
++idx;
@@
-243,9
+240,9
@@
int ir_prog_pass_mgr_run(ir_prog_pass_manager_t *mgr)
if (pass->dump_irprog) {
pass->dump_irprog(irp, pass->context, idx);
} else {
if (pass->dump_irprog) {
pass->dump_irprog(irp, pass->context, idx);
} else {
- char
suffix
[1024];
- create_suffix(
suffix, sizeof(suffix), pass->name, idx
);
- dump_all_ir_graphs(
dump_ir_block_graph, suffix
);
+ char
buf
[1024];
+ create_suffix(
buf, sizeof(buf), pass->name
);
+ dump_all_ir_graphs(
buf
);
}
}
if (pass->is_wrapper) {
}
}
if (pass->is_wrapper) {
@@
-346,7
+343,8
@@
void ir_prog_pass_mgr_set_run_idx(
/**
* Wrapper for running void function(ir_graph *irg) as an ir_graph pass.
*/
/**
* Wrapper for running void function(ir_graph *irg) as an ir_graph pass.
*/
-static int void_graph_wrapper(ir_graph *irg, void *context) {
+static int void_graph_wrapper(ir_graph *irg, void *context)
+{
void (*function)(ir_graph *irg) = context;
function(irg);
return 0;
void (*function)(ir_graph *irg) = context;
function(irg);
return 0;
@@
-371,7
+369,8
@@
ir_graph_pass_t *def_graph_pass(
/**
* Wrapper for running void function(ir_graph *irg) as an ir_graph pass.
*/
/**
* Wrapper for running void function(ir_graph *irg) as an ir_graph pass.
*/
-static int int_graph_wrapper(ir_graph *irg, void *context) {
+static int int_graph_wrapper(ir_graph *irg, void *context)
+{
int (*function)(ir_graph *irg) = context;
return function(irg);
} /* int_graph_wrapper */
int (*function)(ir_graph *irg) = context;
return function(irg);
} /* int_graph_wrapper */
@@
-411,14
+410,16
@@
ir_graph_pass_t *def_graph_pass_constructor(
} /* def_graph_pass_constructor */
/* set the run parallel property */
} /* def_graph_pass_constructor */
/* set the run parallel property */
-void ir_graph_pass_set_parallel(ir_graph_pass_t *pass, int flag) {
+void ir_graph_pass_set_parallel(ir_graph_pass_t *pass, int flag)
+{
pass->run_parallel = flag != 0;
} /* ir_graph_pass_set_parallel */
/**
* Wrapper for running void function(void) as an ir_prog pass.
*/
pass->run_parallel = flag != 0;
} /* ir_graph_pass_set_parallel */
/**
* Wrapper for running void function(void) as an ir_prog pass.
*/
-static int void_prog_wrapper(ir_prog *irp, void *context) {
+static int void_prog_wrapper(ir_prog *irp, void *context)
+{
void (*function)(void) = context;
(void)irp;
void (*function)(void) = context;
(void)irp;
@@
-473,7
+474,8
@@
struct pass_t {
/**
* Wrapper for the call_function pass.
*/
/**
* Wrapper for the call_function pass.
*/
-static int call_function_wrapper(ir_prog *irp, void *context) {
+static int call_function_wrapper(ir_prog *irp, void *context)
+{
struct pass_t *pass = context;
(void)irp;
struct pass_t *pass = context;
(void)irp;