summaryrefslogtreecommitdiffhomepage
path: root/ir/be/TEMPLATE
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2015-08-18 22:05:36 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2015-08-19 10:17:27 +0200
commit60c29ab0b2fa158ad0d05b20e23853dfca93b8d1 (patch)
tree34ae0562008f2b6a00fde6e554706049e2e999e4 /ir/be/TEMPLATE
parentbaeded4f6357b939b02f974000d67b20964c7668 (diff)
be: Use one common function to copy the node attributes in the backend.
All backends had identical implementations. Now rematerialization works out of the box for new backends.
Diffstat (limited to 'ir/be/TEMPLATE')
-rw-r--r--ir/be/TEMPLATE/TEMPLATE_new_nodes.c19
-rw-r--r--ir/be/TEMPLATE/TEMPLATE_spec.pl1
2 files changed, 0 insertions, 20 deletions
diff --git a/ir/be/TEMPLATE/TEMPLATE_new_nodes.c b/ir/be/TEMPLATE/TEMPLATE_new_nodes.c
index cda2508..9a0b369 100644
--- a/ir/be/TEMPLATE/TEMPLATE_new_nodes.c
+++ b/ir/be/TEMPLATE/TEMPLATE_new_nodes.c
@@ -82,24 +82,5 @@ static int TEMPLATE_attrs_equal(const ir_node *a, const ir_node *b)
&& attr_a->entity == attr_b->entity;
}
-static void TEMPLATE_copy_attr(ir_graph *irg, const ir_node *old_node,
- ir_node *new_node)
-{
- struct obstack *obst = get_irg_obstack(irg);
- const void *attr_old = get_irn_generic_attr_const(old_node);
- void *attr_new = get_irn_generic_attr(new_node);
- backend_info_t *old_info = be_get_info(old_node);
- backend_info_t *new_info = be_get_info(new_node);
-
- /* copy the attributes */
- memcpy(attr_new, attr_old, get_op_attr_size(get_irn_op(old_node)));
-
- /* copy out flags */
- new_info->flags = old_info->flags;
- new_info->out_infos =
- DUP_ARR_D(reg_out_info_t, obst, old_info->out_infos);
- new_info->in_reqs = old_info->in_reqs;
-}
-
/* Include the generated constructor functions */
#include "gen_TEMPLATE_new_nodes.c.inl"
diff --git a/ir/be/TEMPLATE/TEMPLATE_spec.pl b/ir/be/TEMPLATE/TEMPLATE_spec.pl
index ce22d34..19921a2 100644
--- a/ir/be/TEMPLATE/TEMPLATE_spec.pl
+++ b/ir/be/TEMPLATE/TEMPLATE_spec.pl
@@ -71,7 +71,6 @@ $mode_fp = "mode_F"; # mode used by floatingpoint registers
);
$default_attr_type = "TEMPLATE_attr_t";
-$default_copy_attr = "TEMPLATE_copy_attr";
my $binop = {
irn_flags => [ "rematerializable" ],