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.
22 /* init functions are not public */
24 # include "irnode_t.h"
25 # include "irmode_t.h"
26 # include "irgraph_t.h"
28 # include "firmstat.h"
31 init_firm (default_initialize_local_variable_func_t *func)
33 /* enhanced statistics */
35 /* initialize all ident stuff */
37 /* create the type kinds. */
39 /* create an obstack and put all tarvals in a pdeq */
41 /* initialize all modes an ir node can consist of */
43 /* initialize tarvals, and floating point arithmetic */
45 /* init graph construction */
47 /* kind of obstack initialization */
49 /* initalize all op codes an irnode can consist of */
51 /* called once for each run of this library */
53 /* Builds a construct allowing to access all information to be constructed
56 /* Constructs some idents needed. */
61 void free_firm (void) {
64 for (i = 0; i < get_irp_n_irgs(); i++)
65 free_ir_graph(get_irp_irg(i));
67 for (i = 0; i < get_irp_n_types(); i++) {
68 free_type_entities(get_irp_type(i));
69 free_type(get_irp_type(i));
72 free_type_entities(get_glob_type());