Commit 85f2a741 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Remove the unused parameter const arch_env_t *arch_env from be_liveness_end_of_block().

[r22718]
parent c8aeb8f4
......@@ -824,12 +824,11 @@ void be_liveness_transfer(const arch_register_class_t *cls,
void be_liveness_end_of_block(const be_lv_t *lv, const arch_env_t *arch_env,
void be_liveness_end_of_block(const be_lv_t *lv,
const arch_register_class_t *cls,
const ir_node *block, ir_nodeset_t *live)
{
int i;
(void)arch_env; // TODO remove parameter
assert(lv->nodes && "live sets must be computed");
be_lv_foreach(lv, block, be_lv_state_end, i) {
......@@ -849,8 +848,9 @@ void be_liveness_nodes_live_at(const be_lv_t *lv, const arch_env_t *arch_env,
{
const ir_node *bl = is_Block(pos) ? pos : get_nodes_block(pos);
ir_node *irn;
(void)arch_env; // TODO remove parameter
be_liveness_end_of_block(lv, arch_env, cls, bl, live);
be_liveness_end_of_block(lv, cls, bl, live);
sched_foreach_reverse(bl, irn) {
/*
* If we encounter the node we want to insert the Perm after,
......@@ -870,9 +870,10 @@ void be_liveness_nodes_live_at_input(const be_lv_t *lv,
{
const ir_node *bl = is_Block(pos) ? pos : get_nodes_block(pos);
ir_node *irn;
(void)arch_env; // TODO remove parameter
assert(lv->nodes && "live sets must be computed");
be_liveness_end_of_block(lv, arch_env, cls, bl, live);
be_liveness_end_of_block(lv, cls, bl, live);
sched_foreach_reverse(bl, irn) {
be_liveness_transfer(cls, irn, live);
if(irn == pos)
......
......@@ -158,13 +158,12 @@ void be_liveness_transfer(const arch_register_class_t *cls, ir_node *node,
/**
* Put all node live at the end of a block into a set.
* @param arch_env The architecture environment.
* @param cls The register class to consider.
* @param bl The block.
* @param live The set to put them into.
* @return live.
*/
void be_liveness_end_of_block(const be_lv_t *lv, const arch_env_t *arch_env,
void be_liveness_end_of_block(const be_lv_t *lv,
const arch_register_class_t *cls,
const ir_node *bl, ir_nodeset_t *nodeset);
......
......@@ -76,7 +76,6 @@ static unsigned be_compute_block_pressure(be_loopana_t *loop_ana,
ir_node *block, const arch_register_class_t *cls)
{
const be_irg_t *birg = loop_ana->birg;
const arch_env_t *aenv = be_get_birg_arch_env(birg);
be_lv_t *lv = be_get_birg_liveness(birg);
ir_nodeset_t live_nodes;
ir_node *irn;
......@@ -86,7 +85,7 @@ static unsigned be_compute_block_pressure(be_loopana_t *loop_ana,
/* determine largest pressure with this block */
ir_nodeset_init(&live_nodes);
be_liveness_end_of_block(lv, aenv, cls, block, &live_nodes);
be_liveness_end_of_block(lv, cls, block, &live_nodes);
max_live = ir_nodeset_size(&live_nodes);
sched_foreach_reverse(block, irn) {
......
......@@ -2073,7 +2073,7 @@ static void process_block(ir_node *block, void *env) {
/* Get all live value at end of Block having current register class */
ir_nodeset_init(&rss->live_block);
be_liveness_end_of_block(rss->liveness, rss->arch_env, rss->cls, rss->block, &rss->live_block);
be_liveness_end_of_block(rss->liveness, rss->cls, rss->block, &rss->live_block);
/* reset the list of interesting nodes */
plist_clear(rss->nodes);
......
......@@ -59,7 +59,6 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
static spill_env_t *spill_env;
static int n_regs;
static const arch_env_t *arch_env;
static const arch_register_class_t *cls;
static const be_lv_t *lv;
static bitset_t *spilled_nodes;
......@@ -316,7 +315,7 @@ static void spill_block(ir_node *block, void *data)
/* construct set of live nodes at end of block */
ir_nodeset_init(&live_nodes);
be_liveness_end_of_block(lv, arch_env, cls, block, &live_nodes);
be_liveness_end_of_block(lv, cls, block, &live_nodes);
/* remove already spilled nodes from liveset */
foreach_ir_nodeset(&live_nodes, node, iter) {
......@@ -390,7 +389,6 @@ void be_spill_daemel(be_irg_t *birg, const arch_register_class_t *new_cls)
be_liveness_assure_sets(be_assure_liveness(birg));
spill_env = be_new_spill_env(birg);
arch_env = be_get_birg_arch_env(birg);
cls = new_cls;
lv = be_get_birg_liveness(birg);
spilled_nodes = bitset_malloc(get_irg_last_idx(irg));
......
......@@ -62,15 +62,14 @@ static void check_reg_pressure_class(pressure_walker_env_t *env,
ir_node *block,
const arch_register_class_t *cls)
{
be_irg_t *birg = env->birg;
ir_graph *irg = be_get_birg_irg(birg);
const arch_env_t *aenv = be_get_birg_arch_env(birg);
ir_node *irn;
ir_nodeset_t live_nodes;
int max_live;
be_irg_t *birg = env->birg;
ir_graph *irg = be_get_birg_irg(birg);
ir_node *irn;
ir_nodeset_t live_nodes;
int max_live;
ir_nodeset_init(&live_nodes);
be_liveness_end_of_block(env->lv, aenv, cls, block, &live_nodes);
be_liveness_end_of_block(env->lv, cls, block, &live_nodes);
max_live = ir_nodeset_size(&live_nodes);
env->regpressure += max_live;
......
......@@ -53,7 +53,6 @@ static int my_values_interfere(const ir_node *a, const ir_node *b);
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 */
......@@ -85,7 +84,7 @@ static void verify_liveness_walker(ir_node *block, void *data) {
/* 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);
......@@ -127,7 +126,6 @@ int be_verify_register_pressure(const be_irg_t *birg,
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment