3 * File name: ir/ana/irextbb.h
4 * Purpose: Extended basis block support.
9 * Copyright: (c) 2002-2005 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
16 * Computes extended basic blocks.
18 * @author Michael Beck
25 typedef struct _ir_extblk ir_extblk;
27 /** Flags for extended basic block state. */
29 ir_extblk_info_none = 0, /**< No extended basic block information is constructed. Default. */
30 ir_extblk_info_valid = 1, /**< Extended basic block information is valid. */
31 ir_extblk_info_invalid = 2, /**< Extended basic block information is constructed but invalid. */
32 } irg_extblk_info_state;
35 * Compute the extended basic blocks for a graph
37 void compute_extbb(ir_graph *irg);
40 * free all extended block info
42 void free_extbb(ir_graph *irg);
45 * Return the extended block of a node.
47 ir_extblk *get_nodes_extbb(ir_node *node);
50 * Gets the visited counter of an extended block.
52 unsigned long get_extbb_visited(const ir_extblk *blk);
55 * Sets the visited counter of an extended block.
57 void set_extbb_visited(ir_extblk *blk, unsigned long visited);
60 * Mark an extended block as visited in a graph.
62 void mark_extbb_visited(ir_extblk *blk);
65 * Returns non-zero if an extended was visited.
67 int extbb_visited(const ir_extblk *blk);
70 * Returns non-zero if an extended block was NOT visited.
72 int extbb_not_visited(const ir_extblk *blk);
75 * Returns the link field of an extended block.
77 void *get_extbb_link(const ir_extblk *blk);
80 * Sets the link field of an extended block.
82 void set_extbb_link(ir_extblk *blk, void *link);
85 * Return the number of basis blocks of an extended block
87 int get_extbb_n_blocks(const ir_extblk *blk);
90 * Return the i'th basis block of an extended block
92 ir_node *get_extbb_block(ir_extblk *blk, int pos);
95 #endif /* _IREXTBB_H_ */