* @date 05.05.2006
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <limits.h>
typedef struct be_verify_register_pressure_env_t_ {
ir_graph *irg; /**< the irg to verify */
be_lv_t *lv; /**< Liveness information. */
- const arch_env_t *arch_env; /**< an architecture environment */
const arch_register_class_t *cls; /**< the register class to check for */
int registers_available; /**< number of available registers */
int problem_found; /**< flag indicating if a problem was found */
/* collect register pressure info, start with end of a block */
// ir_fprintf(stderr, "liveness check %+F\n", block);
ir_nodeset_init(&live_nodes);
- be_liveness_end_of_block(env->lv, env->arch_env, env->cls, block,
+ be_liveness_end_of_block(env->lv, env->cls, block,
&live_nodes);
// print_living_values(stderr, &live_nodes);
env.lv = be_liveness(birg);
env.irg = irg;
- env.arch_env = birg->main_env->arch_env;
env.cls = cls;
env.registers_available = env.cls->n_regs - be_put_ignore_regs(birg, env.cls, NULL);
env.problem_found = 0;
int problem_found; /**< flags indicating if there was a problem */
bitset_t *scheduled; /**< bitset of scheduled nodes */
ir_graph *irg; /**< the irg to check */
- const arch_env_t *arch_env; /**< the arch_env */
} be_verify_schedule_env_t;
/**
env.problem_found = 0;
env.irg = be_get_birg_irg(birg);
env.scheduled = bitset_alloca(get_irg_last_idx(env.irg));
- env.arch_env = birg->main_env->arch_env;
irg_block_walk_graph(env.irg, verify_schedule_walker, NULL, &env);
/* check if all nodes are scheduled */
} spill_t;
typedef struct {
- const arch_env_t *arch_env;
- ir_graph *irg;
- set *spills;
- ir_node **reloads;
- int problem_found;
+ ir_graph *irg;
+ set *spills;
+ ir_node **reloads;
+ int problem_found;
} be_verify_spillslots_env_t;
static int cmp_spill(const void* d1, const void* d2, size_t size) {
}
}
-int be_verify_spillslots(const arch_env_t *arch_env, ir_graph *irg)
+int be_verify_spillslots(ir_graph *irg)
{
be_verify_spillslots_env_t env;
- env.arch_env = arch_env;
env.irg = irg;
env.spills = new_set(cmp_spill, 10);
env.reloads = NEW_ARR_F(ir_node*, 0);