libFirm
irdom.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19 
27 #ifndef FIRM_ANA_IRDOM_H
28 #define FIRM_ANA_IRDOM_H
29 
30 #include "firm_types.h"
31 #include "begin.h"
32 
51 FIRM_API ir_node *get_Block_idom(const ir_node *block);
52 
55 
64 FIRM_API int block_dominates(const ir_node *a, const ir_node *b);
65 
74 FIRM_API int block_strictly_dominates(const ir_node *a, const ir_node *b);
75 
84 FIRM_API int block_postdominates(const ir_node *a, const ir_node *b);
85 
95 
112 
125 
132 #define dominates_for_each(bl,curr) \
133  for(curr = get_Block_dominated_first(bl); curr; \
134  curr = get_Block_dominated_next(curr))
135 
142 #define postdominates_for_each(bl,curr) \
143  for(curr = get_Block_postdominated_first(bl); curr; \
144  curr = get_Block_postdominated_next(curr))
145 
153 
164  irg_walk_func *post, void *env);
165 
176  irg_walk_func *post, void *env);
177 
186  irg_walk_func *post, void *env);
187 
196  irg_walk_func *post, void *env);
197 
213 FIRM_API void compute_doms(ir_graph *irg);
214 
216 FIRM_API void assure_doms(ir_graph *irg);
217 
234 
237 
239 FIRM_API void free_dom(ir_graph *irg);
240 
244 FIRM_API void free_postdom(ir_graph *irg);
245 
251 
259 
262 #include "end.h"
263 
264 #endif