Commit ba9c9184 authored by yb9976's avatar yb9976
Browse files

Moved some ia32 independent code to bemain.

[r26538]
parent a3ff5d70
......@@ -648,6 +648,22 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
dump(DUMP_ABI, irg, "-abi", dump_ir_block_graph);
/* do local optimizations */
optimize_graph_df(irg);
/* we have to do cfopt+remove_critical_edges as we can't have Bad-blocks
* or critical edges in the backend */
optimize_cf(irg);
remove_critical_cf_edges(irg);
/* TODO: we often have dead code reachable through out-edges here. So for
* now we rebuild edges (as we need correct user count for code selection)
*/
edges_deactivate(irg);
edges_activate(irg);
dump(DUMP_PREPARED, irg, "-pre_transform", dump_ir_block_graph_sched);
if (be_options.vrfy_option == BE_VRFY_WARN) {
be_check_dominance(irg);
be_verify_out_edges(irg);
......
......@@ -890,25 +890,6 @@ static void ia32_prepare_graph(void *self)
ia32_code_gen_t *cg = self;
ir_graph *irg = cg->irg;
/* do local optimizations */
optimize_graph_df(irg);
/* we have to do cfopt+remove_critical_edges as we can't have Bad-blocks
* or critical edges in the backend */
optimize_cf(irg);
remove_critical_cf_edges(irg);
/* TODO: we often have dead code reachable through out-edges here. So for
* now we rebuild edges (as we need correct user count for code selection)
*/
#if 1
edges_deactivate(cg->irg);
edges_activate(cg->irg);
#endif
if (cg->dump)
be_dump(cg->irg, "-pre_transform", dump_ir_block_graph_sched);
switch (be_transformer) {
case TRANSFORMER_DEFAULT:
/* transform remaining nodes into assembler instructions */
......
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