#include "tv.h"
#include "opt_confirms.h"
#include "iropt_dbg.h"
+#include "irpass.h"
#undef AVOID_PHIB
DB((
dbg, LEVEL_1,
- "> Found condition evaluation candidate %+F->%+F\n",
+ "> Found jump threading candidate %+F->%+F\n",
env->true_block, block
));
DB((
dbg, LEVEL_1,
- "> Found condition evaluation candidate %+F->%+F\n",
+ "> Found jump threading candidate %+F->%+F\n",
env->true_block, block
));
} else if (selector_evaluated == 1) {
dbg_info *dbgi = get_irn_dbg_info(selector);
ir_node *jmp = new_rd_Jmp(dbgi, get_nodes_block(projx));
- DBG_OPT_COND_EVAL(projx, jmp);
+ DBG_OPT_JUMPTHREADING(projx, jmp);
exchange(projx, jmp);
*changed = 1;
return;
optimize_cf(irg);
}
}
+
+/* Creates an ir_graph pass for opt_jumpthreading. */
+ir_graph_pass_t *opt_jumpthreading_pass(const char *name)
+{
+ return def_graph_pass(name ? name : "jumpthreading", opt_jumpthreading);
+} /* opt_jumpthreading_pass */