Commit 3286ab0d authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Get rid of an anonymous union.

parent 3a35ad57
......@@ -85,7 +85,7 @@ struct constr_info {
/* Last definition of a block. */
ir_node *last_definition;
};
} u;
};
typedef struct constr_info constr_info;
......@@ -158,15 +158,15 @@ static void introduce_definition(be_ssa_construction_env_t *env, ir_node *def)
def_info->is_definition = true;
skip_info->is_definition = true;
skip_info->definition = def;
skip_info->u.definition = def;
// Set the last definition if we only introduce one definition for the block
if (has_definition(block)) {
assert(!block_info->already_processed);
block_info->last_definition = NULL;
block_info->u.last_definition = NULL;
} else {
mark_irn_visited(block);
block_info->last_definition = def;
block_info->u.last_definition = def;
}
}
......@@ -325,13 +325,13 @@ static void process_block(be_ssa_construction_env_t *env, ir_node *block)
if (is_definition(env, node)) {
constr_info *info = get_info(env, node);
def = info->definition;
def = info->u.definition;
DBG((dbg, LEVEL_3, "\t...found definition %+F\n", def));
}
}
block_info->already_processed = true;
block_info->last_definition = def;
block_info->u.last_definition = def;
}
/**
......@@ -341,7 +341,7 @@ static ir_node *search_def_end_of_block(be_ssa_construction_env_t *env,
ir_node *block)
{
constr_info *block_info = get_or_set_info(env, block);
ir_node *last_definition = block_info->last_definition;
ir_node *last_definition = block_info->u.last_definition;
if (last_definition != NULL)
return last_definition;
......@@ -359,7 +359,7 @@ static ir_node *search_def_end_of_block(be_ssa_construction_env_t *env,
sched_foreach_reverse(block, def) {
if (is_definition(env, def)) {
constr_info *info = get_info(env, def);
def = info->definition;
def = info->u.definition;
DBG((dbg, LEVEL_3, "\t...found definition %+F\n", def));
break;
......@@ -368,20 +368,20 @@ static ir_node *search_def_end_of_block(be_ssa_construction_env_t *env,
assert(def && "No definition found");
block_info->last_definition = def;
block_info->u.last_definition = def;
}
return block_info->last_definition;
return block_info->u.last_definition;
} else if (Block_block_visited(block)) {
ir_node *phi = insert_dummy_phi(env, block);
block_info->last_definition = phi;
block_info->u.last_definition = phi;
return phi;
} else {
ir_node *def = get_def_at_idom(env, block);
block_info->last_definition = def;
block_info->u.last_definition = def;
return def;
}
......
Supports Markdown
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