+
+/**
+ * Wrapper for running combo() as an ir_graph pass.
+ */
+static int pass_wrapper(ir_graph *irg, void *context) {
+ (void)context;
+ combo(irg);
+ /* combo is a fix-point iteration */
+ return 0;
+} /* pass_wrapper */
+
+/* Creates an ir_graph pass for combo. */
+ir_graph_pass_t *combo_pass(const char *name, int verify, int dump) {
+ struct ir_graph_pass_t *pass = XMALLOCZ(ir_graph_pass_t);
+
+ pass->kind = k_ir_prog_pass;
+ pass->run_on_irg = pass_wrapper;
+ pass->context = pass;
+ pass->name = name ? name : "combo";
+ pass->verify = verify != 0;
+ pass->dump = dump != 0;
+
+ INIT_LIST_HEAD(&pass->list);
+
+ return pass;
+} /* combo_pass */