X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbenode.c;h=6302de3453fb3366ac890e147167dbf833ec5583;hb=2f1c0bbc129c5e7b9ea0d2b4de729ca88df9d557;hp=a60e01a18c79f084f29734f082fff5ff4550e9dc;hpb=f804d333c7b5459c3c1a6bfc188ecdc54346be73;p=libfirm diff --git a/ir/be/benode.c b/ir/be/benode.c index a60e01a18..6302de345 100644 --- a/ir/be/benode.c +++ b/ir/be/benode.c @@ -548,9 +548,15 @@ static int dump_node(ir_node *irn, FILE *f, dump_reason_t reason) 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; } @@ -577,7 +583,7 @@ static const ir_op_ops be_node_op_ops = { 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; @@ -613,7 +619,7 @@ pset *nodes_live_at(const arch_env_t *arch_env, const arch_register_class_t *cls } } - return NULL; + return live; } ir_node *insert_Perm_after(const arch_env_t *arch_env, @@ -631,8 +637,7 @@ 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);