* @file
* @brief Manager for optimization passes.
* @author Michael Beck
- * @version $Id$
*/
#include "config.h"
void_pass_func_irg function = (void_pass_func_irg)context;
function(irg);
return 0;
-} /* void_graph_wrapper */
+}
/* Creates an ir_graph pass for running void function(ir_graph *irg). */
ir_graph_pass_t *def_graph_pass(
INIT_LIST_HEAD(&pass->list);
return pass;
-} /* def_graph_pass */
+}
/**
* Wrapper for running int function(ir_graph *irg) as an ir_graph pass.
{
int_pass_func_irg function = (int_pass_func_irg)context;
return function(irg);
-} /* int_graph_wrapper */
+}
/* Creates an ir_graph pass for running void function(ir_graph *irg). */
ir_graph_pass_t *def_graph_pass_ret(
INIT_LIST_HEAD(&pass->list);
return pass;
-} /* def_graph_pass_ret */
+}
/* constructor for a default graph pass */
ir_graph_pass_t *def_graph_pass_constructor(
INIT_LIST_HEAD(&pass->list);
return pass;
-} /* def_graph_pass_constructor */
+}
/* set the run parallel property */
void ir_graph_pass_set_parallel(ir_graph_pass_t *pass, int flag)
{
pass->run_parallel = flag != 0;
-} /* ir_graph_pass_set_parallel */
+}
/**
* Wrapper for running void function(void) as an ir_prog pass.
(void)irp;
function();
return 0;
-} /* void_graph_wrapper */
+}
/* Creates an ir_prog pass for running void function(void). */
ir_prog_pass_t *def_prog_pass(
INIT_LIST_HEAD(&pass->list);
return pass;
-} /* def_prog_pass */
+}
/* Creates an ir_prog pass for running void function(void). */
ir_prog_pass_t *def_prog_pass_constructor(
INIT_LIST_HEAD(&pass->list);
return pass;
-} /* def_prog_pass_constructor */
+}
typedef struct pass_t {
ir_prog_pass_t pass;
(void)irp;
pass->function(pass->context);
return 0;
-} /* call_function_wrapper */
+}
ir_prog_pass_t *call_function_pass(
const char *name, void (*function)(void *context), void *context) {
pass->context = context;
return &pass->pass;
-} /* call_function_pass */
+}