summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beinfo.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2014-12-28 15:49:14 +0100
committerChristoph Mallon <mallon@cs.uni-saarland.de>2014-12-28 18:53:08 +0100
commit9f3909c066f0492f277a134d2c01ef405cc48b04 (patch)
treed07baa1e024f8257073e714ae5aed815e0c330f9 /ir/be/beinfo.c
parent30b31affc2e1e8fa2393864e6fc76d01b4a6f950 (diff)
be: Factorise initialisation of backend info into the function be_info_init_irn().
Diffstat (limited to 'ir/be/beinfo.c')
-rw-r--r--ir/be/beinfo.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ir/be/beinfo.c b/ir/be/beinfo.c
index cbb38c7..bd3e25e 100644
--- a/ir/be/beinfo.c
+++ b/ir/be/beinfo.c
@@ -25,6 +25,16 @@
static copy_attr_func old_phi_copy_attr;
+void be_info_init_irn(ir_node *const node, arch_irn_flags_t const flags, arch_register_req_t const **const in_reqs, unsigned const n_res)
+{
+ ir_graph *const irg = get_irn_irg(node);
+ struct obstack *const obst = get_irg_obstack(irg);
+ backend_info_t *const info = be_get_info(node);
+ info->flags = flags;
+ info->in_reqs = in_reqs;
+ info->out_infos = NEW_ARR_DZ(reg_out_info_t, obst, n_res);
+}
+
void be_info_new_node(ir_graph *irg, ir_node *node)
{
/* Projs need no be info, all info is fetched from their predecessor */