projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fulfilled Christian's wishes
[libfirm]
/
ir
/
be
/
benumb.c
diff --git
a/ir/be/benumb.c
b/ir/be/benumb.c
index
380441a
..
db88ac4
100644
(file)
--- a/
ir/be/benumb.c
+++ b/
ir/be/benumb.c
@@
-10,6
+10,7
@@
#include "irnode_t.h"
#include "irgwalk.h"
#include "irnode_t.h"
#include "irgwalk.h"
+#include "xmalloc.h"
#include "be_t.h"
#include "benumb_t.h"
#include "be_t.h"
#include "benumb_t.h"
@@
-24,13
+25,6
@@
FIRM_IMPL1(get_block_node_count, int, const ir_node *)
FIRM_IMPL1(get_graph_block_count, int, const ir_graph *)
FIRM_IMPL2(get_irn_for_graph_nr, ir_node *, const ir_graph *, int)
FIRM_IMPL1(get_graph_block_count, int, const ir_graph *)
FIRM_IMPL2(get_irn_for_graph_nr, ir_node *, const ir_graph *, int)
-static phase_t phase_numbering_info = {
- "Numbering", 0
-};
-
-const phase_t *phase_numbering = &phase_numbering_info;
-
-
static void numbering_walker(ir_node *irn, void *env)
{
irg_numbering_t *graph_nr = get_irg_numbering(get_irn_irg(irn));
static void numbering_walker(ir_node *irn, void *env)
{
irg_numbering_t *graph_nr = get_irg_numbering(get_irn_irg(irn));
@@
-59,7
+53,7
@@
void be_numbering(ir_graph *irg)
irg_walk_graph(irg, numbering_walker, NULL, NULL);
irg_walk_graph(irg, numbering_walker, NULL, NULL);
- reverse_map =
calloc(get_graph_node_count(irg), sizeof(*reverse_map
));
+ reverse_map =
xcalloc(get_graph_node_count(irg), sizeof(reverse_map[0]
));
irg_walk_graph(irg, reverse_walker, NULL, reverse_map);
get_irg_numbering(irg)->reverse_map = reverse_map;
irg_walk_graph(irg, reverse_walker, NULL, reverse_map);
get_irg_numbering(irg)->reverse_map = reverse_map;
@@
-72,7
+66,6
@@
void be_numbering_done(ir_graph *irg)
void be_numbering_init(void)
{
void be_numbering_init(void)
{
- phase_register(&phase_numbering_info);
numbering_irn_data_offset = register_additional_node_data(sizeof(numbering_t));
numbering_irg_data_offset = register_additional_graph_data(sizeof(irg_numbering_t));
}
numbering_irn_data_offset = register_additional_node_data(sizeof(numbering_t));
numbering_irg_data_offset = register_additional_graph_data(sizeof(irg_numbering_t));
}