Commit 976f32d6 authored by Christian Würdig's avatar Christian Würdig
Browse files

added function to get frame offset

parent cd244512
......@@ -766,15 +766,25 @@ int be_has_frame_entity(const ir_node *irn)
}
}
ir_entity* be_get_frame_entity(const ir_node *irn)
ir_entity *be_get_frame_entity(const ir_node *irn)
{
if(be_has_frame_entity(irn)) {
if (be_has_frame_entity(irn)) {
be_frame_attr_t *a = get_irn_attr(irn);
return a->ent;
}
return NULL;
}
int be_get_frame_offset(const ir_node *irn)
{
assert(is_be_node(irn));
if (be_has_frame_entity(irn)) {
be_frame_attr_t *a = get_irn_attr(irn);
return a->offset;
}
return 0;
}
void be_set_MemPerm_in_entity(const ir_node *irn, int n, ir_entity *ent)
{
be_memperm_attr_t *attr = get_irn_attr(irn);
......
......@@ -367,7 +367,12 @@ int be_is_Barrier(const ir_node *irn);
*
* Returns the frame entity used by the be node
*/
ir_entity* be_get_frame_entity(const ir_node *irn);
ir_entity *be_get_frame_entity(const ir_node *irn);
/**
* Returns the frame offset of this node.
*/
int be_get_frame_offset(const ir_node *irn);
ir_node* be_get_Reload_mem(const ir_node *irn);
ir_node* be_get_Spill_val(const ir_node *irn);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment