* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <assert.h>
#include "iroptimize.h"
#include "irgopt.h"
#include "irgwalk.h"
#include "irtools.h"
-#include "array.h"
-#include "xmalloc.h"
+#include "array_t.h"
// debug
#include "irdump.h"
if (projx0 == NULL) continue;
cond = get_Proj_pred(projx0);
- if (get_irn_op(cond) != op_Cond) continue;
+ if (! is_Cond(cond))
+ continue;
/* We only handle boolean decisions, no switches */
if (get_irn_mode(get_Cond_selector(cond)) != mode_b) continue;
for (j = i + 1; j < arity; ++j) {
ir_node* projx1;
- ir_node* cond;
+ ir_node* sel;
ir_node* mux_block;
ir_node* phi;
ir_node* pred1;
prepare_path(block, j, dependency);
arity = get_irn_arity(block);
- cond = get_Cond_selector(cond);
+ sel = get_Cond_selector(cond);
mux_block = get_nodes_block(cond);
cond_dbg = get_irn_dbg_info(cond);
f = val_i;
}
- mux = new_rd_Mux(cond_dbg, current_ir_graph, mux_block, cond, f, t, get_irn_mode(phi));
+ mux = new_rd_Mux(cond_dbg, current_ir_graph, mux_block, sel, f, t, get_irn_mode(phi));
DB((dbg, LEVEL_2, "Generating %+F for %+F\n", mux, phi));
}
compute_cdep(irg);
assure_doms(irg);
- set_using_block_mark(irg);
+ ir_reserve_resources(irg, IR_RESOURCE_BLOCK_MARK | IR_RESOURCE_PHI_LIST);
irg_block_walk_graph(irg, init_block_link, NULL, NULL);
irg_walk_graph(irg, collect_phis, NULL, NULL);
irg_block_walk_graph(irg, NULL, if_conv_walker, &p);
- clear_using_block_mark(irg);
+ ir_free_resources(irg, IR_RESOURCE_BLOCK_MARK | IR_RESOURCE_PHI_LIST);
local_optimize_graph(irg);