*** 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 # 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 /* a list of firm kinds */
33 typedef enum {
34   k_entity,
35   k_type_class,
36   k_type_strct,
37   k_type_method,
38   k_type_union,
39   k_type_array,
40   k_type_enumeration,
41   k_type_pointer,
42   k_type_primitive,
43   k_ir_node
44 } firm_kind;
45
46 /* returns the kind of the thing */
47 firm_kind get_kind(void *firm_thing);
48
49 /* returns a string. */
50 const char* print_firm_kind(void *firm_thing);
51
52
53 # endif /*_COMMON_H_ */