* @brief Remove critical edges.
* @author Christian Schaefer, Goetz Lindenmaier, Sebastian Felis,
* Michael Beck
- * @version $Id$
*/
#include "config.h"
cfop = get_irn_op(skip_Proj(pre));
if (is_op_fragile(cfop)) {
- if (cenv->ignore_exc_edges && get_Proj_proj(pre) == pn_Generic_X_except)
+ if (cenv->ignore_exc_edges && is_x_except_Proj(pre))
continue;
goto insert;
}
- if (is_IJmp(pre)) {
+ if (is_unknown_jump(pre)) {
/* we can't add blocks in between ijmp and its destinations
* TODO: What now, we can't split all critical edges because of this... */
fprintf(stderr, "libfirm warning: Couldn't split all critical edges (compiler will probably fail now)\n");
/* set successor of new block */
set_irn_n(n, i, jmp);
cenv->changed = 1;
- } /* predecessor has multiple successors */
- } /* for all predecessors */
- } /* n is a multi-entry block */
+ }
+ }
+ }
}
void remove_critical_cf_edges_ex(ir_graph *irg, int ignore_exception_edges)
irg_block_walk_graph(irg, NULL, walk_critical_cf_edges, &env);
if (env.changed) {
/* control flow changed */
- set_irg_outs_inconsistent(irg);
- set_irg_extblk_inconsistent(irg);
- set_irg_doms_inconsistent(irg);
- set_irg_loopinfo_inconsistent(irg);
+ clear_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_DOMINANCE);
}
+ set_irg_state(irg, IR_GRAPH_STATE_NO_CRITICAL_EDGES);
}
void remove_critical_cf_edges(ir_graph *irg)