Commit 2f89c8dd authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Initialise and set the "changed"-flag.

[r20971]
parent c64dcb13
...@@ -204,6 +204,7 @@ static void find_cond_nodes(ir_node *block, void *ctx) ...@@ -204,6 +204,7 @@ static void find_cond_nodes(ir_node *block, void *ctx)
* Switch should be transformed into an if cascade. * Switch should be transformed into an if cascade.
* So first order the cases, so we can do a binary search on them. * So first order the cases, so we can do a binary search on them.
*/ */
env->changed = 1;
numcases = get_irn_n_outs(cond) - 1; // does not contain default case numcases = get_irn_n_outs(cond) - 1; // does not contain default case
NEW_ARR_A(case_data_t, cases, numcases); NEW_ARR_A(case_data_t, cases, numcases);
...@@ -255,6 +256,7 @@ void lower_switch(ir_graph *irg, unsigned spare_size) ...@@ -255,6 +256,7 @@ void lower_switch(ir_graph *irg, unsigned spare_size)
current_ir_graph = irg; current_ir_graph = irg;
env.changed = 0;
env.spare_size = spare_size; env.spare_size = spare_size;
remove_critical_cf_edges(irg); remove_critical_cf_edges(irg);
......
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