libFirm 1.20
libfirm/irextbb.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
00003  *
00004  * This file is part of libFirm.
00005  *
00006  * This file may be distributed and/or modified under the terms of the
00007  * GNU General Public License version 2 as published by the Free Software
00008  * Foundation and appearing in the file LICENSE.GPL included in the
00009  * packaging of this file.
00010  *
00011  * Licensees holding valid libFirm Professional Edition licenses may use
00012  * this file in accordance with the libFirm Commercial License.
00013  * Agreement provided with the Software.
00014  *
00015  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00017  * PURPOSE.
00018  */
00019 
00026 #ifndef FIRM_ANA_IREXTBB_H
00027 #define FIRM_ANA_IREXTBB_H
00028 
00029 #include "firm_types.h"
00030 #include "execfreq.h"
00031 #include "begin.h"
00032 
00033 /* type of callback function for ir_graph walk */
00034 #ifndef _EXTBB_WALK_FUNC_TYPEDEF_
00035 #define _EXTBB_WALK_FUNC_TYPEDEF_
00036 
00042 typedef void extbb_walk_func(ir_extblk *blk, void *env);
00043 #endif
00044 
00049 FIRM_API int is_ir_extbb(const void *thing);
00050 
00054 FIRM_API void compute_extbb(ir_graph *irg);
00055 
00059 FIRM_API void compute_extbb_execfreqs(ir_graph *irg, ir_exec_freq *execfreqs);
00060 
00064 FIRM_API void free_extbb(ir_graph *irg);
00065 
00071 FIRM_API ir_extblk *get_nodes_extbb(const ir_node *node);
00072 
00078 FIRM_API ir_visited_t get_extbb_visited(const ir_extblk *blk);
00079 
00086 FIRM_API void set_extbb_visited(ir_extblk *blk, ir_visited_t visited);
00087 
00094 FIRM_API void mark_extbb_visited(ir_extblk *blk);
00095 
00102 FIRM_API int extbb_visited(const ir_extblk *blk);
00103 
00110 FIRM_API int extbb_not_visited(const ir_extblk *blk);
00111 
00117 FIRM_API void *get_extbb_link(const ir_extblk *blk);
00118 
00125 FIRM_API void set_extbb_link(ir_extblk *blk, void *link);
00126 
00132 FIRM_API int get_extbb_n_blocks(const ir_extblk *blk);
00133 
00140 FIRM_API ir_node *get_extbb_block(const ir_extblk *blk, int pos);
00141 
00147 FIRM_API ir_node *get_extbb_leader(const ir_extblk *blk);
00148 
00155 FIRM_API long get_extbb_node_nr(const ir_extblk *blk);
00156 
00172 FIRM_API void irg_extblock_walk(ir_extblk *blk, extbb_walk_func *pre,
00173                                 extbb_walk_func *post, void *env);
00174 
00187 FIRM_API void irg_extblock_walk_graph(ir_graph *irg, extbb_walk_func *pre,
00188                                       extbb_walk_func *post, void *env);
00189 
00190 #include "end.h"
00191 
00192 #endif