summaryrefslogtreecommitdiffhomepage
path: root/ir/stat
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2014-09-15 19:03:29 +0200
committerMatthias Braun <matze@braunis.de>2014-09-17 17:17:43 +0200
commitf3209aa8d3fe148e180d1747e7360a8d8737e598 (patch)
tree9f25783911ac099e7fbdfc6b27f36bea19fffc40 /ir/stat
parent512cb109a33fcb43c4cb84b220cefd64f33d26e6 (diff)
put irg link directly into node attributs
The previous approach put the irg link into the block attributes, so while saving memory an extra indirection was necessary. Some testing with valgrind massif+callgrind revealed that a direct link increses peak memory usage by ~1% while also increasing runtime by ~1%. More importantly the code gets a bit simpler and some strange corner cases can be removed with the direct link.
Diffstat (limited to 'ir/stat')
-rw-r--r--ir/stat/dags.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/stat/dags.c b/ir/stat/dags.c
index e72b494..b2b04c7 100644
--- a/ir/stat/dags.c
+++ b/ir/stat/dags.c
@@ -128,7 +128,7 @@ static void find_dag_roots(ir_node *node, void *env)
block = get_nodes_block(node);
/* ignore start end end blocks */
- ir_graph *const irg = get_Block_irg(block);
+ ir_graph *const irg = get_irn_irg(node);
if (block == get_irg_start_block(irg) || block == get_irg_end_block(irg))
return;
@@ -198,7 +198,7 @@ static void connect_dags(ir_node *node, void *env)
block = get_nodes_block(node);
/* ignore start end end blocks */
- ir_graph *const irg = get_Block_irg(block);
+ ir_graph *const irg = get_irn_irg(node);
if (block == get_irg_start_block(irg) || block == get_irg_end_block(irg))
return;