3 * File name: ir/common/firm.c
4 * Purpose: Central firm functionality.
5 * Author: Martin Trapp, Christian Schaefer
6 * Modified by: Goetz Lindenmaier
9 * Copyright: (c) 1998-2003 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
21 /* init functions are not public */
24 # include "irnode_t.h"
25 # include "irmode_t.h"
26 # include "irgraph_t.h"
28 # include "type_identify.h"
29 # include "firmstat.h"
32 init_firm (default_initialize_local_variable_func_t *func)
34 /* initialize all ident stuff */
36 /* enhanced statistics, need idents */
38 /* create the type kinds. */
40 /* create an obstack and put all tarvals in a pdeq */
42 /* initialize all modes an ir node can consist of */
44 /* initialize tarvals, and floating point arithmetic */
46 /* init graph construction */
48 /* kind of obstack initialization */
50 /* initalize all op codes an irnode can consist of */
52 /* called once for each run of this library */
54 /* Builds a construct allowing to access all information to be constructed
57 /* Constructs some idents needed. */
59 /* allocate a hash table. */
64 void free_firm (void) {
67 for (i = 0; i < get_irp_n_irgs(); i++)
68 free_ir_graph(get_irp_irg(i));
70 for (i = 0; i < get_irp_n_types(); i++) {
71 free_type_entities(get_irp_type(i));
72 free_type(get_irp_type(i));
75 free_type_entities(get_glob_type());