Rework linkage types in firm.
[libfirm] / ir / be / bearch.c
index 2b50c37..83c0661 100644 (file)
@@ -71,17 +71,16 @@ static inline const arch_irn_ops_t *get_irn_ops(const ir_node *irn)
 
 const arch_register_req_t *arch_get_register_req(const ir_node *irn, int pos)
 {
-       const arch_irn_ops_t *ops;
-
        if (is_Proj(irn)) {
                assert(pos == -1);
                pos = -1-get_Proj_proj(irn);
                irn = get_Proj_pred(irn);
        }
-       ops = get_irn_ops_simple(irn);
+
        if (pos < 0) {
-               return ops->get_irn_reg_req_out(irn, -pos-1);
+               return arch_get_out_register_req(irn, -pos-1);
        } else {
+               const arch_irn_ops_t *ops = get_irn_ops_simple(irn);
                return ops->get_irn_reg_req_in(irn, pos);
        }
 }