fix trailing whitespaces and tabulators in the middle of a line
[libfirm] / ir / be / ia32 / ia32_new_nodes.c
index f427c97..7452cb9 100644 (file)
@@ -649,42 +649,6 @@ unsigned get_ia32_latency(const ir_node *node)
        return op_attr->latency;
 }
 
-/**
- * Returns the argument register requirements of an ia32 node.
- */
-const arch_register_req_t **get_ia32_in_req_all(const ir_node *node)
-{
-       const ia32_attr_t *attr = get_ia32_attr_const(node);
-       return attr->in_req;
-}
-
-/**
- * Sets the argument register requirements of an ia32 node.
- */
-void set_ia32_in_req_all(ir_node *node, const arch_register_req_t **reqs)
-{
-       ia32_attr_t *attr = get_ia32_attr(node);
-       attr->in_req      = reqs;
-}
-
-/**
- * Returns the argument register requirement at position pos of an ia32 node.
- */
-const arch_register_req_t *get_ia32_in_req(const ir_node *node, int pos)
-{
-       const ia32_attr_t *attr = get_ia32_attr_const(node);
-       return attr->in_req[pos];
-}
-
-/**
- * Sets the IN register requirements at position pos.
- */
-void set_ia32_req_in(ir_node *node, const arch_register_req_t *req, int pos)
-{
-       ia32_attr_t *attr = get_ia32_attr(node);
-       attr->in_req[pos] = req;
-}
-
 /**
  * Returns the condition code of a node.
  */
@@ -774,7 +738,8 @@ const char *get_ia32_orig_node(const ir_node *node)
 
 static const char *ia32_get_old_node_name(const ir_node *irn)
 {
-       struct obstack *obst = env_cg->isa->name_obst;
+       ir_graph       *irg  = get_irn_irg(irn);
+       struct obstack *obst = be_get_be_obst(irg);
 
        lc_eoprintf(firm_get_arg_env(), obst, "%+F", irn);
        obstack_1grow(obst, 0);
@@ -838,7 +803,7 @@ void init_ia32_attributes(ir_node *node, arch_irn_flags_t flags,
        backend_info_t  *info;
 
        arch_irn_set_flags(node, flags);
-       set_ia32_in_req_all(node, in_reqs);
+       arch_set_in_register_reqs(node, in_reqs);
 
        attr->exec_units  = execution_units;
 #ifndef NDEBUG
@@ -852,13 +817,15 @@ void init_ia32_attributes(ir_node *node, arch_irn_flags_t flags,
 
 void init_ia32_x87_attributes(ir_node *res)
 {
+       ir_graph        *irg      = get_irn_irg(res);
+       ia32_irg_data_t *irg_data = ia32_get_irg_data(irg);
 #ifndef NDEBUG
        ia32_attr_t *attr  = get_ia32_attr(res);
        attr->attr_type   |= IA32_ATTR_ia32_x87_attr_t;
 #else
        (void) res;
 #endif
-       ia32_current_cg->do_x87_sim = 1;
+       irg_data->do_x87_sim = 1;
 }
 
 void init_ia32_asm_attributes(ir_node *res)
@@ -1114,6 +1081,7 @@ static void ia32_copy_attr(ir_graph *irg, const ir_node *old_node,
        /* copy out 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 */