path: root/ir/be/bestack.c
diff options
authorMatthias Braun <>2014-09-15 19:03:29 +0200
committerMatthias Braun <>2014-09-17 17:17:43 +0200
commitf3209aa8d3fe148e180d1747e7360a8d8737e598 (patch)
tree9f25783911ac099e7fbdfc6b27f36bea19fffc40 /ir/be/bestack.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/bestack.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/ir/be/bestack.c b/ir/be/bestack.c
index e381263..adfa964 100644
--- a/ir/be/bestack.c
+++ b/ir/be/bestack.c
@@ -119,7 +119,7 @@ typedef struct bias_walk {
static int process_stack_bias(ir_node *bl, int real_bias)
int wanted_bias = real_bias;
- ir_graph *irg = get_Block_irg(bl);
+ ir_graph *irg = get_irn_irg(bl);
be_stack_layout_t *layout = be_get_irg_stack_layout(irg);
bool sp_relative = layout->sp_relative;
const arch_env_t *arch_env = be_get_irg_arch_env(irg);