Commit 4d808298 authored by Michael Beck's avatar Michael Beck
Browse files

- C99 features removed

- renamed second var i

[r21771]
parent 81f2da32
......@@ -422,8 +422,8 @@ static void val_used(worklist_t *worklist, ir_node *value, ir_node *sched_point)
static void worklist_remove(worklist_t *worklist, ir_node *value)
{
ir_fprintf(stderr, "removing %+F\n", value);
worklist_entry_t *entry = get_irn_link(value);
ir_fprintf(stderr, "removing %+F\n", value);
assert(entry != NULL);
list_del(&entry->head);
--worklist->n_live_values;
......@@ -757,6 +757,8 @@ static void push_unused_livethrough(loop_info_t *loop_info, ir_node *value)
static void push_unused_livethroughs(loop_info_t *loop_info)
{
loop_edge_t *edge;
/* we can only push unused livethroughs if register pressure inside the loop
* was low enough */
if (loop_info->max_register_pressure >= n_regs)
......@@ -765,25 +767,26 @@ static void push_unused_livethroughs(loop_info_t *loop_info)
/* find unused livethroughs: register pressure in the loop was low enough
* which means that we had no spills which implies that at every point in
* the loop all*/
loop_edge_t *edge = loop_info->exit_edges;
for ( ; edge != NULL; edge = edge->next) {
for (edge = loop_info->exit_edges; edge != NULL; edge = edge->next) {
ir_node *block = edge->block;
const block_info_t *info = get_block_info(block);
worklist_t *start_worklist = info->start_worklist;
ir_node *exit_block;
const block_info_t *exit_info;
worklist_t *end_worklist;
struct list_head *entry;
if (start_worklist == NULL)
continue;
ir_node *exit_block
= get_Block_cfgpred_block(edge->block, edge->pos);
const block_info_t *exit_info = get_block_info(exit_block);
worklist_t *end_worklist = exit_info->end_worklist;
exit_block = get_Block_cfgpred_block(edge->block, edge->pos);
exit_info = get_block_info(exit_block);
end_worklist = exit_info->end_worklist;
activate_worklist(end_worklist);
/* all values contained in the start_worklist, which are not available
* in the end_worklist, must be unused livethroughs */
struct list_head *entry;
list_for_each(entry, &start_worklist->live_values) {
worklist_entry_t *wl_entry
= list_entry(entry, worklist_entry_t, head);
......
......@@ -822,20 +822,18 @@ static void verify_block_register_allocation(ir_node *block, void *data) {
nregclasses = arch_env_get_n_reg_class(arch_env);
for (i = 0; i < nregclasses; ++i) {
ir_node *node;
int i2;
int i2, lv_idx, n_regs;
regclass = arch_env_get_reg_class(arch_env, i);
int i;
assert(lv->nodes && "live sets must be computed");
int n_regs = arch_register_class_n_regs(regclass);
registers = alloca(n_regs * sizeof(registers[0]));
n_regs = arch_register_class_n_regs(regclass);
registers = alloca(n_regs * sizeof(registers[0]));
memset(registers, 0, n_regs * sizeof(registers[0]));
be_lv_foreach(lv, block, be_lv_state_end, i) {
ir_node *node = be_lv_get_irn(lv, block, i);
be_lv_foreach(lv, block, be_lv_state_end, lv_idx) {
ir_node *node = be_lv_get_irn(lv, block, lv_idx);
value_used(node);
}
......
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