expose some critical bearch functions for inlining
[libfirm] / ir / be / benode.c
index c728fcd..b4a2197 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <stdlib.h>
 
+#include "beirg.h"
 #include "obst.h"
 #include "set.h"
 #include "pmap.h"
@@ -830,7 +831,7 @@ 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 = OALLOC(obst, arch_register_req_t);
-       const arch_register_class_t *cls = arch_register_get_class(reg);
+       const arch_register_class_t *cls = reg->reg_class;
        unsigned                    *limited_bitset;
 
        limited_bitset = rbitset_obstack_alloc(obst, arch_register_class_n_regs(cls));
@@ -969,7 +970,6 @@ static const arch_irn_ops_t be_node_irn_ops = {
        be_node_get_frame_entity,
        be_node_set_frame_offset,
        be_node_get_sp_bias,
-       NULL,    /* get_inverse             */
        NULL,    /* get_op_estimated_cost   */
        NULL,    /* possible_memory_operand */
        NULL,    /* perform_memory_operand  */
@@ -987,7 +987,7 @@ static int get_start_reg_index(ir_graph *irg, const arch_register_t *reg)
                        = arch_get_irn_register_req_out(start, i);
                if (! (out_req->type & arch_register_req_type_limited))
                        continue;
-               if (out_req->cls != arch_register_get_class(reg))
+               if (out_req->cls != reg->reg_class)
                        continue;
                if (!rbitset_is_set(out_req->limited, reg->index))
                        continue;
@@ -1000,7 +1000,7 @@ ir_node *be_get_initial_reg_value(ir_graph *irg, const arch_register_t *reg)
 {
        int      i     = get_start_reg_index(irg, reg);
        ir_node *start = get_irg_start(irg);
-       ir_mode *mode  = arch_register_class_mode(arch_register_get_class(reg));
+       ir_mode *mode  = arch_register_class_mode(reg->reg_class);
 
        foreach_out_edge(start, edge) {
                ir_node *proj = get_edge_src_irn(edge);
@@ -1022,7 +1022,7 @@ int be_find_return_reg_input(ir_node *ret, const arch_register_t *reg)
                const arch_register_req_t *req = arch_get_irn_register_req_in(ret, i);
                if (! (req->type & arch_register_req_type_limited))
                        continue;
-               if (req->cls != arch_register_get_class(reg))
+               if (req->cls != reg->reg_class)
                        continue;
                if (!rbitset_is_set(req->limited, reg->index))
                        continue;
@@ -1055,7 +1055,6 @@ static const arch_irn_ops_t dummy_be_irn_ops = {
        dummy_get_frame_entity,
        dummy_set_frame_offset,
        dummy_get_sp_bias,
-       NULL,      /* get_inverse           */
        NULL,      /* get_op_estimated_cost */
        NULL,      /* possible_memory_operand */
        NULL,      /* perform_memory_operand */
@@ -1130,7 +1129,6 @@ static const arch_irn_ops_t phi_irn_ops = {
        dummy_get_frame_entity,
        dummy_set_frame_offset,
        dummy_get_sp_bias,
-       NULL,    /* get_inverse             */
        NULL,    /* get_op_estimated_cost   */
        NULL,    /* possible_memory_operand */
        NULL,    /* perform_memory_operand  */