1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
4 * Authors: Martin Trapp, Christian Schaefer, Goetz Lindenmaier.
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
16 This header is the central header of the library implementation of this
19 The internal representation of a program in firm is separated into five
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.)
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).
43 ircons: Interface to construct firm graphs, implements automatic Phi node
45 iropt: Optimizations applied to individual nodes.
46 irgopt: Optimizations for ir graphs.
48 irflag: Flags to direct the functionality.
49 common: dynamic typ check for all nodes, configuration of the library,
52 irgwalk: walker for ir graphs.
53 irvrfy: verify the correctness of a firm node.
62 /* The representations */
63 # include "firm_common.h"/* common type tags. */
64 # include "irprog.h" /* control flow and data of a program */
65 # include "type.h" /* type representation */
66 # include "entity.h" /* entity representation */
67 # include "tv.h" /* target values */
68 # include "ident.h" /* source code identificators */
70 # include "ircons.h" /* construct ir */
71 # include "ircgcons.h" /* construct interprocedural graph */
73 # include "irflag.h" /* optimization flags */
74 # include "irgopt.h" /* optimize ir */
75 # include "ircgopt.h" /* Optimizations based on interprocedural graph */
77 # include "irdom.h" /* Dominator analysis */
78 # include "cgana.h" /* Analysis to construct interprocedural graph */
79 /* including some optimizations */
80 # include "irloop.h" /* loop and backedge analysis */
82 # include "irgmod.h" /* Support to modify ir */
83 # include "irgwalk.h" /* Support to walk ir */
84 # include "typewalk.h" /* Support to walk type information */
85 # include "typegmod.h" /* Support to modify type graph */
86 # include "mangle.h" /* Support for mangling ident names. */
88 /* @@@ temporarily for jni builder until preprocessor works.
89 Then it should be sufficient to include <file.h> instead
90 of firm.h as not all enums are needed in the impelmentation
95 * Initialize the firm library.
97 * @param func This function is called, whenever a local variable is used before definition
99 * The parameter func may be NULL. In that case, the old FIRM behavior is conserved.
101 * @see default_initialize_local_variable_func_t
103 void init_firm (default_initialize_local_variable_func_t *func);
105 # endif /* _FIRM_H_ */