#include "config.h"
#endif /* HAVE_CONFIG_H */
+#define DISABLE_STATEV
+
#include <float.h>
#include "array.h"
* 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;
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