Commit 48f6b852 authored by yb9976's avatar yb9976
Browse files

Disable local optimizations during if conversion.

This fixes opt/ifconv10.c and opt/ifconv12.c.
parent 8e2dc000
......@@ -453,12 +453,19 @@ void opt_if_conv_cb(ir_graph *irg, arch_allow_ifconv_func callback)
irg_block_walk_graph(irg, init_block_link, fill_waitq, waitq);
irg_walk_graph(irg, collect_phis, NULL, NULL);
/* Disable local optimizations to avoid the creation of
* new Phi nodes that are not tracked by the if conversion. */
int rem_opt = get_optimize();
set_optimize(0);
while (! pdeq_empty(waitq)) {
ir_node *n = (ir_node *)pdeq_getl(waitq);
if_conv_walker(n, &env);
}
del_pdeq(waitq);
set_optimize(rem_opt);
ir_free_resources(irg, IR_RESOURCE_BLOCK_MARK | IR_RESOURCE_PHI_LIST);
if (env.changed) {
......
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