add list_head typedef
[libfirm] / include / libfirm / firm_types.h
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
20 /**
21  * @file
22  * @brief      Definition of opaque firm types
23  * @author     Michael Beck
24  * @version    $Id$
25  */
26 #ifndef FIRM_COMMON_FIRM_TYPES_H
27 #define FIRM_COMMON_FIRM_TYPES_H
28
29 #ifdef _MSC_VER
30 typedef          __int64 long64;
31 typedef unsigned __int64 ulong64;
32
33 #define LL_FMT  "i64"
34 #define ULL_FMT "ui64"
35
36 #else
37 typedef          long long long64;
38 typedef unsigned long long ulong64;
39
40 #define LL_FMT  "ll"
41 #define ULL_FMT "llu"
42
43 #endif /* _MSC_VER */
44
45 typedef unsigned long ir_visited_t;
46 typedef unsigned long ir_exc_region_t;
47 typedef unsigned long ir_label_t;
48
49 typedef struct dbg_info             dbg_info,            *dbg_info_ptr;
50 typedef const struct _ident         ident,               *ir_ident_ptr;
51 typedef struct ir_node              ir_node,             *ir_node_ptr;
52 typedef struct ir_op                ir_op,               *ir_op_ptr;
53 typedef struct ir_mode              ir_mode,             *ir_mode_ptr;
54 typedef struct _ir_edge_t           ir_edge_t,           *ir_edge_ptr;
55 typedef struct tarval               tarval,              *ir_tarval_ptr;
56 typedef struct ir_enum_const        ir_enum_const,       *ir_enum_const_ptr;
57 typedef struct ir_type              ir_type,             *ir_type_ptr;
58 typedef struct ir_graph             ir_graph,            *ir_graph_ptr;
59 typedef struct ir_loop              ir_loop,             *ir_loop_ptr;
60 typedef struct ir_region            ir_region,           *ir_region_ptr;
61 typedef struct ir_reg_tree          ir_reg_tree,         *ir_reg_tree_ptr;
62 typedef struct ir_entity            ir_entity,           *ir_entity_ptr;
63 typedef struct compound_graph_path  compound_graph_path, *ir_compound_graph_path_ptr;
64 typedef struct _ir_phase            ir_phase,            *ir_phase_ptr;
65 typedef struct _ir_extblk           ir_extblk,           *ir_extblk_ptr;
66 typedef struct ir_exec_freq         ir_exec_freq,        *ir_exec_freq_ptr;
67 typedef struct ir_cdep              ir_cdep,             *ir_cdep_ptr;
68 typedef struct sn_entry             *seqno_t;
69
70 typedef union  ir_initializer_t     ir_initializer_t,    *ir_initializer_ptr;
71
72 typedef void irg_walk_func(ir_node *, void *);
73 typedef void irg_reg_walk_func(ir_region *, void *);
74
75 /* settings */
76 typedef struct ir_settings_arch_dep_t ir_settings_arch_dep_t;
77 typedef struct ir_settings_if_conv_t  ir_settings_if_conv_t;
78
79 /* states */
80
81 /** The state of the interprocedural view.
82  *
83  * This value indicates the state of the interprocedural view.
84  */
85 typedef enum {
86         ip_view_no,       /**< The interprocedural view is not constructed.  There are no
87                                view specific nodes (EndReg, Filter, Break ...) in any graph.  */
88         ip_view_valid,    /**< The interprocedural view is valid.  */
89         ip_view_invalid   /**< The interprocedural view is invalid.  Specific nodes are
90                                all still in the representation, but the graph is no more complete. */
91 } ip_view_state;
92
93
94
95 #endif