Bugfix in irdom.
[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 // #define PRECISE_EXC_CONTEXT 0
22
23 /* There are two implementations of the Phi node construction.  The first
24    is faster, but does not work for blocks with more than 2 predecessors.
25    The second works always but is slower and causes more unnecessary Phi
26    nodes.
27    Select the implementations by the following preprocessor flag: */
28 #define USE_FAST_PHI_CONSTRUCTION 0
29
30 /* Further there are two versions of the fast Phi node construction.
31    If the following flag is set, new_r_Phi_in uses an explicit stack for
32    allocating and deallocating Phi nodes.  Else it uses the obstack
33    as a stack! */
34 #define USE_EXPICIT_PHI_IN_STACK 1
35
36 #define DEBUG_libfirm 1
37 /* If this is defined debuging aids are created, e.g. a field in
38    ir_node uniquely numbering the nodes.
39    Warum war das auskommentiert?? (--enable-debug hat das nicht gesetzt.
40    #define DEBUG_libfirm 1
41  * this is now set by the configure script as an option
42  * use
43 #ifdef HAVE_CONFIG_H
44 # include <config.h>
45 #endif
46  * instead
47  */
48
49 /* If this and DEBUG_libfirm are defined irdump uses the nodeid numbers as
50    labels for the vcg nodes.  This makes the vcg graph better readable.
51    Sometimes it's useful to see the pointer values, though. */
52 #define NODEID_AS_LABEL 1
53
54 /* a list of firm kinds */
55 typedef enum {
56   k_entity,
57   k_type,
58   k_ir_node
59 } firm_kind;
60
61 /* returns the kind of the thing */
62 firm_kind get_kind(void *firm_thing);
63
64 /* returns a string. */
65 const char* print_firm_kind(void *firm_thing);
66
67
68 # endif /*_COMMON_H_ */