libFirm 1.20
|
Manager for transformation passes. More...
Go to the source code of this file.
Functions | |
ir_graph_pass_manager_t * | new_graph_pass_mgr (const char *name, int verify_all, int dump_all) |
Creates a new ir_graph pass manager. | |
void | ir_graph_pass_mgr_add (ir_graph_pass_manager_t *mgr, ir_graph_pass_t *pass) |
Adds an ir_graph pass to a graph pass manager. | |
int | ir_graph_pass_mgr_run (ir_graph_pass_manager_t *mgr) |
Runs all passes of an ir_graph pass manager. | |
void | term_graph_pass_mgr (ir_graph_pass_manager_t *mgr) |
Terminates an ir_graph pass manager and all owned passes. | |
ir_prog_pass_manager_t * | new_prog_pass_mgr (const char *name, int verify_all, int dump_all) |
Creates a new ir_prog pass manager. | |
void | ir_prog_pass_mgr_add (ir_prog_pass_manager_t *mgr, ir_prog_pass_t *pass) |
Adds an ir_prog pass to an ir_prog pass manager. | |
void | ir_prog_pass_mgr_add_graph_mgr (ir_prog_pass_manager_t *mgr, ir_graph_pass_manager_t *graph_mgr) |
Adds an ir_graph_pass_manager as a pass to an ir_prog pass manager. | |
void | ir_prog_pass_mgr_add_graph_pass (ir_prog_pass_manager_t *mgr, ir_graph_pass_t *pass) |
Adds an ir_graph_pass as a pass to an ir_prog pass manager. | |
int | ir_prog_pass_mgr_run (ir_prog_pass_manager_t *mgr) |
Runs all passes of an ir_prog pass manager. | |
void | term_prog_pass_mgr (ir_prog_pass_manager_t *mgr) |
Terminates an ir_prog pass manager and all owned passes. | |
void | ir_graph_pass_mgr_set_run_idx (ir_graph_pass_manager_t *mgr, unsigned run_idx) |
Sets the run index for an irgraph pass manager. | |
ir_graph_pass_t * | def_graph_pass (const char *name, void(*function)(ir_graph *irg)) |
Creates an ir_graph pass for running void function(ir_graph *irg). | |
ir_graph_pass_t * | def_graph_pass_ret (const char *name, int(*function)(ir_graph *irg)) |
Creates an ir_graph pass for running int function(ir_graph *irg). | |
ir_graph_pass_t * | def_graph_pass_constructor (ir_graph_pass_t *memory, const char *name, int(*function)(ir_graph *irg, void *context)) |
Creates an ir_graph pass for running int function(ir_graph *irg). | |
void | ir_graph_pass_set_parallel (ir_graph_pass_t *pass, int flag) |
Sets the run_parallel property of a graph pass. | |
ir_prog_pass_t * | def_prog_pass (const char *name, void(*function)(void)) |
Creates an ir_prog pass for running void function(). | |
ir_prog_pass_t * | def_prog_pass_constructor (ir_prog_pass_t *memory, const char *name, int(*function)(ir_prog *irp, void *context)) |
Creates an ir_prog pass for running void function(). | |
ir_prog_pass_t * | call_function_pass (const char *name, void(*function)(void *context), void *context) |
Creates a pass that calls some function. | |
void | ir_prog_pass_mgr_set_run_idx (ir_prog_pass_manager_t *mgr, unsigned run_idx) |
Sets the run index for an irprog pass manager. |
Manager for transformation passes.
Definition in file irpass.h.
ir_prog_pass_t* call_function_pass | ( | const char * | name, |
void(*)(void *context) | function, | ||
void * | context | ||
) |
Creates a pass that calls some function.
This pass calls the given function, but has no dump nor verify.
name | the name of this pass |
function | the function to run |
context | context parameter |
ir_graph_pass_t* def_graph_pass | ( | const char * | name, |
void(*)(ir_graph *irg) | function | ||
) |
Creates an ir_graph pass for running void function(ir_graph *irg).
Uses the default verifier and dumper. The pass returns always 0.
name | the name of this pass |
function | the function to run |
ir_graph_pass_t* def_graph_pass_constructor | ( | ir_graph_pass_t * | memory, |
const char * | name, | ||
int(*)(ir_graph *irg, void *context) | function | ||
) |
Creates an ir_graph pass for running int function(ir_graph *irg).
Uses the default verifier and dumper. The pass returns the return value of function.
memory | if non-NULL, an already allocated ir_graph_pass_t |
name | the name of this pass |
function | the function to run |
ir_graph_pass_t* def_graph_pass_ret | ( | const char * | name, |
int(*)(ir_graph *irg) | function | ||
) |
Creates an ir_graph pass for running int function(ir_graph *irg).
Uses the default verifier and dumper. The pass returns the return value of function.
name | the name of this pass |
function | the function to run |
ir_prog_pass_t* def_prog_pass | ( | const char * | name, |
void(*)(void) | function | ||
) |
Creates an ir_prog pass for running void function().
Uses the default verifier and dumper. The pass returns always 0.
name | the name of this pass |
function | the function to run |
ir_prog_pass_t* def_prog_pass_constructor | ( | ir_prog_pass_t * | memory, |
const char * | name, | ||
int(*)(ir_prog *irp, void *context) | function | ||
) |
Creates an ir_prog pass for running void function().
Uses the default verifier and dumper. The pass returns always 0.
memory | if non-NULL, an already allocated ir_prog_pass_t |
name | the name of this pass |
function | the function to run |
void ir_graph_pass_mgr_add | ( | ir_graph_pass_manager_t * | mgr, |
ir_graph_pass_t * | pass | ||
) |
Adds an ir_graph pass to a graph pass manager.
mgr | the ir_graph pass manager |
pass | the pass to add |
int ir_graph_pass_mgr_run | ( | ir_graph_pass_manager_t * | mgr | ) |
Runs all passes of an ir_graph pass manager.
mgr | the manager |
void ir_graph_pass_mgr_set_run_idx | ( | ir_graph_pass_manager_t * | mgr, |
unsigned | run_idx | ||
) |
Sets the run index for an irgraph pass manager.
mgr | the manager |
run_idx | the index for the first pass of this manager |
void ir_graph_pass_set_parallel | ( | ir_graph_pass_t * | pass, |
int | flag | ||
) |
Sets the run_parallel property of a graph pass.
If the flag is set to non-zero, the pass can be executed parallel on all graphs of a ir_prog.
pass | the pass |
flag | new flag setting |
void ir_prog_pass_mgr_add | ( | ir_prog_pass_manager_t * | mgr, |
ir_prog_pass_t * | pass | ||
) |
Adds an ir_prog pass to an ir_prog pass manager.
mgr | the ir_prog pass manager |
pass | the pass to add |
void ir_prog_pass_mgr_add_graph_mgr | ( | ir_prog_pass_manager_t * | mgr, |
ir_graph_pass_manager_t * | graph_mgr | ||
) |
Adds an ir_graph_pass_manager as a pass to an ir_prog pass manager.
mgr | the ir_prog pass manager |
graph_mgr | the ir_graph pass manager to be added |
void ir_prog_pass_mgr_add_graph_pass | ( | ir_prog_pass_manager_t * | mgr, |
ir_graph_pass_t * | pass | ||
) |
Adds an ir_graph_pass as a pass to an ir_prog pass manager.
mgr | the ir_prog pass manager |
pass | the ir_graph pass to be added |
int ir_prog_pass_mgr_run | ( | ir_prog_pass_manager_t * | mgr | ) |
Runs all passes of an ir_prog pass manager.
mgr | the manager |
void ir_prog_pass_mgr_set_run_idx | ( | ir_prog_pass_manager_t * | mgr, |
unsigned | run_idx | ||
) |
Sets the run index for an irprog pass manager.
mgr | the manager |
run_idx | the index for the first pass of this manager |
ir_graph_pass_manager_t* new_graph_pass_mgr | ( | const char * | name, |
int | verify_all, | ||
int | dump_all | ||
) |
Creates a new ir_graph pass manager.
name | the name of the manager |
verify_all | if non-zero, all passes of this manager will be verified |
dump_all | if non-zero, all passes results will be dumped |
ir_prog_pass_manager_t* new_prog_pass_mgr | ( | const char * | name, |
int | verify_all, | ||
int | dump_all | ||
) |
Creates a new ir_prog pass manager.
name | the name of the manager |
verify_all | if non-zero, all passes of this manager will be verified |
dump_all | if non-zero, all passes results will be dumped |
void term_graph_pass_mgr | ( | ir_graph_pass_manager_t * | mgr | ) |
Terminates an ir_graph pass manager and all owned passes.
mgr | the manager |
void term_prog_pass_mgr | ( | ir_prog_pass_manager_t * | mgr | ) |
Terminates an ir_prog pass manager and all owned passes.
mgr | the manager |