From 88e67644276b3c9dde0c2c5efd786da86cf48092 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 9 Jul 2010 16:17:05 +0000 Subject: [PATCH] make API for creating single register constraints public [r27723] --- ir/be/benode.c | 6 +++--- ir/be/benode.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ir/be/benode.c b/ir/be/benode.c index 5ba5f3444..5e89abdf7 100644 --- a/ir/be/benode.c +++ b/ir/be/benode.c @@ -907,7 +907,7 @@ int be_get_MemPerm_entity_arity(const ir_node *irn) return get_irn_arity(irn) - 1; } -static const arch_register_req_t *get_single_req(struct obstack *obst, +const arch_register_req_t *be_create_reg_req(struct obstack *obst, const arch_register_t *reg, arch_register_req_type_t additional_types) { arch_register_req_t *req = obstack_alloc(obst, sizeof(*req)); @@ -933,7 +933,7 @@ void be_set_constr_single_reg_in(ir_node *node, int pos, } else { ir_graph *irg = get_irn_irg(node); struct obstack *obst = be_get_be_obst(irg); - req = get_single_req(obst, reg, additional_types); + req = be_create_reg_req(obst, reg, additional_types); } be_set_constr_in(node, pos, req); } @@ -953,7 +953,7 @@ void be_set_constr_single_reg_out(ir_node *node, int pos, } else { ir_graph *irg = get_irn_irg(node); struct obstack *obst = be_get_be_obst(irg); - req = get_single_req(obst, reg, additional_types); + req = be_create_reg_req(obst, reg, additional_types); } arch_irn_set_register(node, pos, reg); diff --git a/ir/be/benode.h b/ir/be/benode.h index 901cc9b80..31e79a39b 100644 --- a/ir/be/benode.h +++ b/ir/be/benode.h @@ -454,6 +454,9 @@ void be_set_constr_single_reg_in(ir_node *irn, int pos, void be_set_constr_single_reg_out(ir_node *irn, int pos, const arch_register_t *reg, arch_register_req_type_t additional_flags); +const arch_register_req_t *be_create_reg_req(struct obstack *obst, + const arch_register_t *reg, arch_register_req_type_t additional_types); + /** * Impose register constraints on a backend node. * The register subsets given by the limited function in @p req are copied to -- 2.20.1