if(get_irn_be_opcode(irn) == beo_Spill) {
be_spill_attr_t *a = (be_spill_attr_t *) at;
- unsigned ofs = get_entity_offset_bytes(a->ent);
+
ir_fprintf(f, "spill context: %+F\n", a->spill_ctx);
- ir_fprintf(f, "spill entity: %+F offset %x (%d)\n", a->ent, ofs, ofs);
+ if (a->ent) {
+ unsigned ofs = get_entity_offset_bytes(a->ent);
+ ir_fprintf(f, "spill entity: %+F offset %x (%d)\n", a->ent, ofs, ofs);
+ }
+ else {
+ ir_fprintf(f, "spill entity: n/a\n");
+ }
}
break;
}
pset *nodes_live_at(const arch_env_t *arch_env, const arch_register_class_t *cls, const ir_node *pos, pset *live)
{
firm_dbg_module_t *dbg = firm_dbg_register("firm.be.node");
- ir_node *bl = get_nodes_block(pos);
+ const ir_node *bl = is_Block(pos) ? pos : get_nodes_block(pos);
ir_node *irn;
irn_live_t *li;
}
}
- return NULL;
+ return live;
}
ir_node *insert_Perm_after(const arch_env_t *arch_env,
DBG((dbg, LEVEL_1, "Insert Perm after: %+F\n", pos));
- if(!nodes_live_at(arch_env, cls, pos, live))
- assert(0 && "position not found");
+ if(!nodes_live_at(arch_env, cls, pos, live));
n = pset_count(live);