all the autoconfig stuff
[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_class,
44   k_type_strct,
45   k_type_method,
46   k_type_union,
47   k_type_array,
48   k_type_enumeration,
49   k_type_pointer,
50   k_type_primitive,
51   k_ir_node
52 } firm_kind;
53
54 /* returns the kind of the thing */
55 firm_kind get_kind(void *firm_thing);
56
57 /* returns a string. */
58 const char* print_firm_kind(void *firm_thing);
59
60
61 # endif /*_COMMON_H_ */