summaryrefslogtreecommitdiffhomepage
path: root/ir/be/belive.c
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/be/belive.c
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/be/belive.c')
-rw-r--r--ir/be/belive.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/be/belive.c b/ir/be/belive.c
index 9c9e381..b4bf315 100644
--- a/ir/be/belive.c
+++ b/ir/be/belive.c
@@ -415,7 +415,7 @@ static bool value_live_after(const ir_node *const value,
/* If value is live end in after's block it is
* live at after's definition (value dominates after) */
const ir_node *const bb = get_nodes_block(after);
- const ir_graph *const irg = get_Block_irg(bb);
+ const ir_graph *const irg = get_irn_irg(after);
const be_lv_t *const lv = be_get_irg_liveness(irg);
if (be_is_live_end(lv, bb, value))
return true;
@@ -504,7 +504,7 @@ bool be_memory_values_interfere(const ir_node *a, const ir_node *b)
/* If a is live end in b's block it is
* live at b's definition (a dominates b) */
const ir_node *const bb = get_nodes_block(b);
- const ir_graph *const irg = get_Block_irg(bb);
+ const ir_graph *const irg = get_irn_irg(b);
const be_lv_t *const lv = be_get_irg_liveness(irg);
if (be_is_live_end(lv, bb, a))
return true;