summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bestack.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2014-11-23 01:39:41 +0100
committerMatthias Braun <matze@braunis.de>2014-11-25 08:25:02 +0100
commit4b9bb36a8497776cb7227392c073274ba07cfc03 (patch)
treec3f3d31e90f301c1b468ead5c8e7dd321d252167 /ir/be/bestack.c
parent5232416f79b797c37a880ffca283e88b828344f8 (diff)
remove arch_get_frame_entity()
Add callbacks on functions that really need them instead.
Diffstat (limited to 'ir/be/bestack.c')
-rw-r--r--ir/be/bestack.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ir/be/bestack.c b/ir/be/bestack.c
index b87688b..b894476 100644
--- a/ir/be/bestack.c
+++ b/ir/be/bestack.c
@@ -77,6 +77,7 @@ typedef struct bias_walk {
ir_node *start_block; /**< The start block of the current graph. */
get_sp_bias_func get_sp_bias;
set_frame_offset_func set_frame_offset;
+ get_frame_entity_func get_frame_entity;
} bias_walk;
/**
@@ -98,7 +99,7 @@ static int process_stack_bias(const bias_walk *bw, ir_node *bl, int real_bias)
/* Check, if the node relates to an entity on the stack frame.
* If so, set the true offset (including the bias) for that
* node. */
- ir_entity *ent = arch_get_frame_entity(irn);
+ ir_entity *ent = bw->get_frame_entity(irn);
if (ent != NULL) {
int bias = sp_relative ? real_bias : 0;
int offset = be_get_stack_entity_offset(layout, ent, bias);
@@ -160,7 +161,8 @@ static void stack_bias_walker(ir_node *bl, void *data)
}
void be_abi_fix_stack_bias(ir_graph *irg, get_sp_bias_func get_sp_bias,
- set_frame_offset_func set_frame_offset)
+ set_frame_offset_func set_frame_offset,
+ get_frame_entity_func get_frame_entity)
{
be_stack_layout_t *stack_layout = be_get_irg_stack_layout(irg);
@@ -171,6 +173,7 @@ void be_abi_fix_stack_bias(ir_graph *irg, get_sp_bias_func get_sp_bias,
bw.start_block = get_irg_start_block(irg);
bw.get_sp_bias = get_sp_bias;
bw.set_frame_offset = set_frame_offset;
+ bw.get_frame_entity = get_frame_entity;
bw.start_block_bias = process_stack_bias(&bw, bw.start_block, stack_layout->initial_bias);
/* fix the bias is all other blocks */