Remove the unused parameter const arch_env_t *env from arch_get_register_req().
[libfirm] / ir / be / becopyheur4.c
index bfad18b..3c2a262 100644 (file)
@@ -33,6 +33,8 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#define DISABLE_STATEV
+
 #include <float.h>
 
 #include "array.h"
@@ -254,7 +256,7 @@ static int cmp_col_cost_gt(const void *a, const void *b) {
  * Creates a new affinity chunk
  */
 static INLINE aff_chunk_t *new_aff_chunk(co_mst_env_t *env) {
-       aff_chunk_t *c = xmalloc(sizeof(*c) + (env->n_regs - 1) * sizeof(c->color_affinity[0]));
+       aff_chunk_t *c = XMALLOCF(aff_chunk_t, color_affinity, env->n_regs);
        c->n                 = NEW_ARR_F(const ir_node *, 0);
        c->interfere         = NEW_ARR_F(const ir_node *, 0);
        c->weight            = -1;
@@ -379,7 +381,7 @@ static void *co_mst_irn_init(ir_phase *ph, const ir_node *irn, void *old) {
                res->adm_colors = bitset_obstack_alloc(phase_obst(ph), env->n_regs);
 
                /* Exclude colors not assignable to the irn */
-               req = arch_get_register_req(env->aenv, irn, -1);
+               req = arch_get_register_req(irn, -1);
                if (arch_register_req_is(req, limited))
                        rbitset_copy_to_bitset(req->limited, res->adm_colors);
                else