minor bug fix to previous changes
[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 /** Global flags.  Set these by autoconf?? **/
14
15 /* There are two implementations of the Phi node construction.  The first
16    is faster, but does not work for blocks with more than 2 predecessors.
17    The second works always but is slower and causes more unnecessary Phi
18    nodes.
19    Select the implementations by the following preprocessor flag: */
20 #define USE_FAST_PHI_CONSTRUCTION 0
21
22 /* Further there are two versions of the fast Phi node construction.
23    If the following flag is set, new_r_Phi_in uses an explicit stack for
24    allocating and deallocating Phi nodes.  Else it uses the obstack
25    as a stack! */
26 #define USE_EXPICIT_PHI_IN_STACK 1
27
28 /* If this is defined debuging aids are created, e.g. a field in
29    ir_node uniquely numbering the nodes. */
30 /* #define DEBUG_libfirm 1 */
31 /*
32  * this is now set by the configure script as an option
33  * use
34 #ifdef HAVE_CONFIG_H
35 # include <config.h>
36 #endif
37  * instead
38  */
39
40 /* a list of firm kinds */
41 typedef enum {
42   k_entity,
43   k_type,
44   k_ir_node
45 } firm_kind;
46
47 #if 0
48   k_type_class,
49   k_type_strct,
50   k_type_method,
51   k_type_union,
52   k_type_array,
53   k_type_enumeration,
54   k_type_pointer,
55   k_type_primitive,
56 #endif
57
58 /* returns the kind of the thing */
59 firm_kind get_kind(void *firm_thing);
60
61 /* returns a string. */
62 const char* print_firm_kind(void *firm_thing);
63
64
65 # endif /*_COMMON_H_ */