summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beinfo.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2011-12-12 19:45:12 +0100
committerMatthias Braun <matze@braunis.de>2011-12-14 01:51:47 +0100
commit3e32262d83cf529f74aae833c7557557ab39782a (patch)
tree0dbb341d21a0ac98ce00a65238d83512e141bc1c /ir/be/beinfo.c
parent6bc15eba58c5d8c33b010fdb85cbf384b758283e (diff)
Move current_ir_graph from ir_graph to ir_cons
It should only be used by construction algorithms
Diffstat (limited to 'ir/be/beinfo.c')
-rw-r--r--ir/be/beinfo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ir/be/beinfo.c b/ir/be/beinfo.c
index 53aca77..56f5964 100644
--- a/ir/be/beinfo.c
+++ b/ir/be/beinfo.c
@@ -36,7 +36,7 @@
static copy_attr_func old_phi_copy_attr;
-void be_info_new_node(ir_node *node)
+void be_info_new_node(ir_graph *irg, ir_node *node)
{
struct obstack *obst;
backend_info_t *info;
@@ -45,7 +45,7 @@ void be_info_new_node(ir_node *node)
if (is_Proj(node))
return;
- obst = be_get_be_obst(current_ir_graph);
+ obst = be_get_be_obst(irg);
info = OALLOCZ(obst, backend_info_t);
assert(node->backend_info == NULL);
@@ -124,8 +124,9 @@ int be_nodes_equal(const ir_node *node1, const ir_node *node2)
static void init_walker(ir_node *node, void *data)
{
+ ir_graph *irg = get_irn_irg(node);
(void) data;
- be_info_new_node(node);
+ be_info_new_node(irg, node);
}
static bool initialized = false;