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