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