libFirm 1.20
|
Extended basis block support. More...
Go to the source code of this file.
Typedefs | |
typedef void | extbb_walk_func (ir_extblk *blk, void *env) |
The type of a walk function. | |
Functions | |
int | is_ir_extbb (const void *thing) |
Checks whether a pointer points to a extended basic block. | |
void | compute_extbb (ir_graph *irg) |
Compute the extended basic blocks for a graph. | |
void | compute_extbb_execfreqs (ir_graph *irg, ir_exec_freq *execfreqs) |
Compute the extended basic blocks for a graph based on execution frequencies. | |
void | free_extbb (ir_graph *irg) |
free all extended block info. | |
ir_extblk * | get_nodes_extbb (const ir_node *node) |
Returns the extended block of a node. | |
ir_visited_t | get_extbb_visited (const ir_extblk *blk) |
Returns the visited counter of an extended block. | |
void | set_extbb_visited (ir_extblk *blk, ir_visited_t visited) |
Sets the visited counter of an extended block. | |
void | mark_extbb_visited (ir_extblk *blk) |
Mark an extended block as visited in a graph. | |
int | extbb_visited (const ir_extblk *blk) |
Returns non-zero if an extended was visited. | |
int | extbb_not_visited (const ir_extblk *blk) |
Returns non-zero if an extended block was NOT visited. | |
void * | get_extbb_link (const ir_extblk *blk) |
Returns the link field of an extended block. | |
void | set_extbb_link (ir_extblk *blk, void *link) |
Sets the link field of an extended block. | |
int | get_extbb_n_blocks (const ir_extblk *blk) |
Returns the number of basic blocks of an extended block. | |
ir_node * | get_extbb_block (const ir_extblk *blk, int pos) |
Returns the i'th basic block of an extended block. | |
ir_node * | get_extbb_leader (const ir_extblk *blk) |
Returns the leader basic block of an extended block. | |
long | get_extbb_node_nr (const ir_extblk *blk) |
Returns the node number of an extended block. | |
void | irg_extblock_walk (ir_extblk *blk, extbb_walk_func *pre, extbb_walk_func *post, void *env) |
Walks only over Extended Basic Block nodes in the graph. | |
void | irg_extblock_walk_graph (ir_graph *irg, extbb_walk_func *pre, extbb_walk_func *post, void *env) |
Walks only over reachable Extended Basic Block nodes in the graph. |
typedef void extbb_walk_func(ir_extblk *blk, void *env) |
void compute_extbb | ( | ir_graph * | irg | ) |
Compute the extended basic blocks for a graph.
void compute_extbb_execfreqs | ( | ir_graph * | irg, |
ir_exec_freq * | execfreqs | ||
) |
Compute the extended basic blocks for a graph based on execution frequencies.
int extbb_not_visited | ( | const ir_extblk * | blk | ) |
Returns non-zero if an extended block was NOT visited.
Uses the block visit flag.
blk | the extended basic block |
int extbb_visited | ( | const ir_extblk * | blk | ) |
Returns non-zero if an extended was visited.
Uses the block visit flag.
blk | the extended basic block |
void free_extbb | ( | ir_graph * | irg | ) |
free all extended block info.
Returns the i'th basic block of an extended block.
blk | the extended basic block |
pos | the position |
Returns the leader basic block of an extended block.
blk | the extended basic block |
void* get_extbb_link | ( | const ir_extblk * | blk | ) |
Returns the link field of an extended block.
blk | the extended basic block |
int get_extbb_n_blocks | ( | const ir_extblk * | blk | ) |
Returns the number of basic blocks of an extended block.
blk | the extended basic block |
long get_extbb_node_nr | ( | const ir_extblk * | blk | ) |
Returns the node number of an extended block.
Its the block number of the leader block
blk | the extended basic block |
ir_visited_t get_extbb_visited | ( | const ir_extblk * | blk | ) |
Returns the visited counter of an extended block.
blk | the extended basic block |
Returns the extended block of a node.
node | the node |
void irg_extblock_walk | ( | ir_extblk * | blk, |
extbb_walk_func * | pre, | ||
extbb_walk_func * | post, | ||
void * | env | ||
) |
Walks only over Extended Basic Block nodes in the graph.
blk | - the start extended block node |
pre | - walker function, executed before the predecessor of a node are visited |
post | - walker function, executed after the predecessor of a node are visited |
env | - environment, passed to pre and post |
This function Walks only over Block nodes in the graph. Has its own visited flag, so that it can be interleaved with the other walker. If a none block is passed, starts at the block this node belongs to. If end is passed also visits kept alive blocks. Does not use the link field.
void irg_extblock_walk_graph | ( | ir_graph * | irg, |
extbb_walk_func * | pre, | ||
extbb_walk_func * | post, | ||
void * | env | ||
) |
Walks only over reachable Extended Basic Block nodes in the graph.
Ensures, that the extended block containing the End node is visited last and the block containing Start visited first (in post order).
irg | - the irg graph |
pre | - walker function, executed before the predecessor of a block are visited |
post | - walker function, executed after the predecessor of a block are visited |
env | - environment, passed to pre and post |
int is_ir_extbb | ( | const void * | thing | ) |
Checks whether a pointer points to a extended basic block.
Intern version for libFirm.
void mark_extbb_visited | ( | ir_extblk * | blk | ) |
Mark an extended block as visited in a graph.
Uses the block visit flag.
blk | the extended basic block |
void set_extbb_link | ( | ir_extblk * | blk, |
void * | link | ||
) |
Sets the link field of an extended block.
blk | the extended basic block |
link | the new link value |
void set_extbb_visited | ( | ir_extblk * | blk, |
ir_visited_t | visited | ||
) |
Sets the visited counter of an extended block.
blk | the extended basic block |
visited | new value for the visited counter |