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