new_node->attr.block.block_visited = 0;
memset(&new_node->attr.block.dom, 0, sizeof(new_node->attr.block.dom));
memset(&new_node->attr.block.pdom, 0, sizeof(new_node->attr.block.pdom));
- /* TODO: we should probably create a new entity. But we somehow have to
- * patch the stuff at the same time */
- new_node->attr.block.entity = NULL;
- new_node->attr.block.phis = NULL;
+ /* It should be safe to copy the entity here, as it has no back-link to the old block.
+ * It serves just as a label number, so copying a labeled block results in an exact copy.
+ * This is at least what we need for DCE to work. */
+ new_node->attr.block.entity = old_node->attr.block.entity;
+ new_node->attr.block.phis = NULL;
INIT_LIST_HEAD(&new_node->attr.block.succ_head);
}
default_copy_attr(irg, old_node, new_node);
new_node->attr.assem.input_constraints = DUP_ARR_D(ir_asm_constraint, irg->obst, old_node->attr.assem.input_constraints);
new_node->attr.assem.output_constraints = DUP_ARR_D(ir_asm_constraint, irg->obst, old_node->attr.assem.output_constraints);
- new_node->attr.assem.clobbers = DUP_ARR_D(ir_asm_constraint, irg->obst, old_node->attr.assem.clobbers);
+ new_node->attr.assem.clobbers = DUP_ARR_D(ident*, irg->obst, old_node->attr.assem.clobbers);
}
/**
* @return
* The operations.
*/
-static ir_op_ops *firm_set_default_copy_attr(ir_opcode code, ir_op_ops *ops)
+static ir_op_ops *firm_set_default_copy_attr(unsigned code, ir_op_ops *ops)
{
switch (code) {
case iro_Call:
firm_set_default_operations(code, &res->ops);
firm_set_default_copy_attr(code, &res->ops);
- firm_set_default_verifyer(code, &res->ops);
+ firm_set_default_verifier(code, &res->ops);
firm_set_default_reassoc(code, &res->ops);
add_irp_opcode(res);
irop_flags get_op_flags(const ir_op *op)
{
- return op->flags;
+ return (irop_flags)op->flags;
}
#include "gen_irop.c.inl"