5ccd9c9bb7566578e37500306e1ed0159e0033bc
[libfirm] / ir / common / common.h
1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
3 **
4 ** Authors: Martin Trapp, Christian Schaefer &
5 **          Goetz Lindenmaier
6 **
7 ** common.h: common firm declarations
8 */
9
10 # ifndef _COMMON_H_
11 # define _COMMON_H_
12
13 /* There are two implementations of the Phi node construction.  The first
14    is faster, but does not work for blocks with more than 2 predecessors.
15    The second works always but is slower and causes more unnecessary Phi
16    nodes.
17    Select the implementations by the following preprocessor flag: */
18 #define USE_FAST_PHI_CONSTRUCTION 1
19
20 /* Further there are two versions of the fast Phi node construction.
21    If the following flag is set, new_r_Phi_in uses an explicit stack for
22    allocating and deallocating Phi nodes.  Else it uses the obstack
23    as a stack! */
24 #define USE_EXPICIT_PHI_IN_STACK 0
25
26 /* a list of firm kinds */
27 typedef enum {
28   k_entity,
29   k_type_class,
30   k_type_strct,
31   k_type_method,
32   k_type_union,
33   k_type_array,
34   k_type_enumeration,
35   k_type_pointer,
36   k_type_primitive,
37   k_ir_node
38 } firm_kind;
39
40 /* returns the kind of the thing */
41 firm_kind get_kind(void *firm_thing);
42
43
44 # endif /*_COMMON_H_ */