libFirm
irloop.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1995-2011 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 
32 #ifndef FIRM_ANA_IRLOOP_H
33 #define FIRM_ANA_IRLOOP_H
34 
35 #include "firm_types.h"
36 #include "firm_common.h"
37 #include "begin.h"
38 
45 FIRM_API int is_backedge(const ir_node *n, int pos);
47 FIRM_API void set_backedge(ir_node *n, int pos);
49 FIRM_API void set_not_backedge(ir_node *n, int pos);
51 FIRM_API int has_backedges(const ir_node *n);
54 
56 typedef union {
61 } loop_element;
62 
66 FIRM_API int is_ir_loop(const void *thing);
67 
69 FIRM_API void set_irg_loop(ir_graph *irg, ir_loop *l);
70 
73 
76 
80 FIRM_API unsigned get_loop_depth(const ir_loop *loop);
81 
83 FIRM_API size_t get_loop_n_elements(const ir_loop *loop);
84 
87 FIRM_API loop_element get_loop_element(const ir_loop *loop, size_t pos);
88 
92 FIRM_API long get_loop_loop_nr(const ir_loop *loop);
93 
95 FIRM_API void set_loop_link(ir_loop *loop, void *link);
98 FIRM_API void *get_loop_link(const ir_loop *loop);
99 
121 
139 
146 
154 
162 FIRM_API int is_loop_invariant(const ir_node *n, const ir_node *block);
163 
166 #include "end.h"
167 
168 #endif