First part of commit removing xprintf to make later merging easier
[libfirm] / ir / common / firm.h
1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 * All rights reserved.
3 *
4 * Authors: Martin Trapp, Christian Schaefer, Goetz Lindenmaier.
5 */
6
7 /**
8  @file firm.h
9
10     Central FIRM header.
11
12     FIRM is a full graph based intermediate representation in SSA Form
13     with a novel concept to model side effects.  It allows fast, aggressive
14     optimizations.
15
16     This header is the central header of the library implementation of this
17     IR.
18
19     The internal representation of a program in firm is separated into five
20     different modules:
21      - Firm Graphs representing the code of a program. (Subdirectory ir.)
22        Firm Graphs are assembled out of several data structures:
23        irprog: represents a program.  Allows access to all types and all
24          FIRM graphs for procedures and other global things.
25        irgraph: represents a procedure.  Allows access to the code of the
26          procedure, the actual FIRM graph.
27        irnode: A node of a FIRM graph.  Nodes are typed with an opcode and a mode
28          and represent instructions in a program.
29        irop: The opcode of FIRM nodes.
30        irmode: The mode of FIRM nodes.  Most modes correspond to machine known
31          data types (int, float, pointer).
32      - Entities representing program known objects. (Subdirectory tr.)
33        All variables and procedures are entities.
34      - Types describing the type system for the program. (Subdirectory tr.)
35      - Target Values representing program known constants. (Subdirectory tv.)
36      - Identifiers representing any Strings used in the program. (Subdirectory ident.)
37
38      Further this library supplies functionality to build and optimize FIRM graphs
39      and further functionality needed in a compiler.  Finally there is more
40      generic functionality to support implementations using firm.  (Code generation,
41      further optimizations).
42
43      ircons: Interface to construct firm graphs, implements automatic Phi node
44        construction.
45      iropt: Optimizations applied to individual nodes.
46      irgopt: Optimizations for ir graphs.
47
48      irflag: Flags to direct the functionality.
49      common: dynamic typ check for all nodes,  configuration of the library,
50      debug:  ???
51
52      irgwalk: walker for ir graphs.
53      irvrfy:  verify the correctness of a firm node.
54 *
55 */
56
57 /* $Id$ */
58
59 # ifndef _FIRM_H_
60 # define _FIRM_H_
61
62 /* The representations */
63 # include "irprog.h"     /* control flow and data of a program */
64 # include "type.h"       /* type representation */
65 # include "entity.h"     /* entity representation */
66 # include "tv.h"         /* target values */
67 # include "ident.h"      /* source code identificators */
68 /* Functionality */
69 # include "ircons.h"     /* construct ir */
70 # include "ircgcons.h"   /* construct interprocedural graph */
71
72 # include "irflag.h"     /* optimization flags */
73 # include "irgopt.h"     /* optimize ir */
74 # include "ircgopt.h"    /* Optimizations based on interprocedural graph */
75
76 # include "irdom.h"      /* Dominator analysis */
77 # include "cgana.h"      /* Analysis to construct interprocedural graph */
78                          /* including some optimizations */
79 # include "irloop.h"     /* loop and backedge analysis */
80
81 # include "irgmod.h"     /* Support to modify ir */
82 # include "irgwalk.h"    /* Support to walk ir */
83 # include "typewalk.h"   /* Support to walk type information */
84 # include "typegmod.h"   /* Support to modify type graph */
85 # include "mangle.h"     /* Support for mangling ident names. */
86
87 /* @@@ temporarily for jni builder until preprocessor works.
88    Then it should be sufficient to include <file.h> instead
89    of firm.h as not all enums are needed in the impelmentation
90    files. */
91 # include "irdump.h"
92
93 /**
94  * Initialize the firm library.
95  *
96  * @param func    This function is called, whenever a local variable is used before definition
97  *
98  * The parameter func may be NULL. In that case, the old FIRM behavior is conserved.
99  *
100  * @see default_initialize_local_variable_func_t
101  */
102 void init_firm (default_initialize_local_variable_func_t *func);
103
104 # endif /* _FIRM_H_ */