libFirm
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
irprog.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
29
#ifndef FIRM_IR_IRPROG_H
30
#define FIRM_IR_IRPROG_H
31
32
#include <stddef.h>
33
#include "
firm_types.h
"
34
#include "
irgraph.h
"
35
#include "
begin.h
"
36
60
typedef
enum
ir_segment_t
{
61
IR_SEGMENT_FIRST,
63
IR_SEGMENT_GLOBAL
= IR_SEGMENT_FIRST,
65
IR_SEGMENT_THREAD_LOCAL
,
71
IR_SEGMENT_CONSTRUCTORS
,
73
IR_SEGMENT_DESTRUCTORS
,
74
75
IR_SEGMENT_LAST =
IR_SEGMENT_DESTRUCTORS
76
}
ir_segment_t
;
77
ENUM_COUNTABLE
(
ir_segment_t
)
78
79
86
FIRM_API
ir_prog
*
irp
;
87
91
typedef enum
irp_resources_t
{
92
IRP_RESOURCE_NONE
= 0,
94
IRP_RESOURCE_IRG_LINK
= 1 << 0,
96
IRP_RESOURCE_ENTITY_LINK
= 1 << 1,
99
IRP_RESOURCE_TYPE_VISITED
= 1 << 2,
101
IRP_RESOURCE_TYPE_LINK
= 1 << 3,
102
}
irp_resources_t
;
103
ENUM_BITSET
(
irp_resources_t
)
104
105
#ifndef NDEBUG
106
113
FIRM_API
void
irp_reserve_resources
(
ir_prog
*
irp
,
irp_resources_t
resources);
115
FIRM_API
void
irp_free_resources
(
ir_prog
*
irp
,
irp_resources_t
resources);
117
FIRM_API
irp_resources_t
irp_resources_reserved
(
const
ir_prog
*
irp
);
118
#else
119
#define irp_reserve_resources(irp, resources) (void)0
120
#define irp_free_resources(irp, resources) (void)0
121
#define irp_resources_reserved(irp) 0
122
#endif
123
130
FIRM_API
ir_prog
*
get_irp
(
void
);
131
133
FIRM_API
void
set_irp
(
ir_prog
*
irp
);
134
141
FIRM_API
ir_prog
*
new_ir_prog
(
const
char
*name);
142
145
FIRM_API
void
free_ir_prog
(
void
);
146
149
FIRM_API
void
set_irp_prog_name
(
ident
*name);
150
152
FIRM_API
int
irp_prog_name_is_set
(
void
);
153
155
FIRM_API
ident
*
get_irp_ident
(
void
);
156
158
FIRM_API
const
char
*
get_irp_name
(
void
);
159
161
FIRM_API
ir_graph
*
get_irp_main_irg
(
void
);
162
164
FIRM_API
void
set_irp_main_irg
(
ir_graph
*main_irg);
165
167
FIRM_API
size_t
get_irp_last_idx
(
void
);
168
170
FIRM_API
size_t
get_irp_n_irgs
(
void
);
171
173
FIRM_API
ir_graph
*
get_irp_irg
(
size_t
pos);
174
176
FIRM_API
void
set_irp_irg
(
size_t
pos,
ir_graph
*irg);
177
183
FIRM_API
ir_type
*
get_segment_type
(
ir_segment_t
segment);
184
189
FIRM_API
void
set_segment_type
(
ir_segment_t
segment,
ir_type
*new_type);
190
196
FIRM_API
ir_type
*
get_glob_type
(
void
);
197
203
FIRM_API
ir_type
*
get_tls_type
(
void
);
204
209
FIRM_API
size_t
get_irp_n_types
(
void
);
210
215
FIRM_API
ir_type
*
get_irp_type
(
size_t
pos);
216
221
FIRM_API
void
set_irp_type
(
size_t
pos,
ir_type
*typ);
222
234
FIRM_API
ir_graph
*
get_const_code_irg
(
void
);
235
238
FIRM_API
irg_callee_info_state
get_irp_callee_info_state
(
void
);
241
FIRM_API
void
set_irp_callee_info_state
(
irg_callee_info_state
s);
242
244
FIRM_API
ir_label_t
get_irp_next_label_nr
(
void
);
245
247
FIRM_API
void
add_irp_asm
(
ident
*asm_string);
248
250
FIRM_API
size_t
get_irp_n_asms
(
void
);
251
253
FIRM_API
ident
*
get_irp_asm
(
size_t
pos);
254
257
#include "
end.h
"
258
259
#endif
libfirm
irprog.h
Generated on Sat Nov 24 2012 19:13:48 for libFirm by
1.8.1.2