Adapted to changes in tv and irmode
[libfirm] / ir / common / firm.c
1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 * All rights reserved.
3 *
4 * Authors: Martin Trapp, Christian Schaefer
5 *
6 */
7
8 /* $Id$ */
9
10 #ifdef HAVE_CONFIG_H
11 # include <config.h>
12 #endif
13
14 # include <stdio.h>
15 # include "ident_t.h"
16 # include "firm.h"
17 # include "mangle.h"
18 # include "xp_help.h"
19 # include "tv_t.h"
20 /* init functions are not public */
21 # include "tpop_t.h"
22 # include "irnode_t.h"
23 # include "irmode_t.h"
24 # include "irgraph_t.h"
25
26 void
27 init_firm (default_initialize_local_variable_func_t *func)
28 {
29   /* register the character 'I' as variable for ident outputs. */
30   xprintf_register ('I', ident_print);
31   /* register the character 'v' as variable for tarval outputs. */
32   xprintf_register ('v', tarval_print);
33   /* register the character 'R' as variable for ir node outputs. */
34   xprintf_register ('R', ir_node_print);
35
36   /* initialize all ident stuff */
37   id_init ();
38   /* create the type kinds. */
39   init_tpop ();
40   /* create an obstack and put all tarvals in a pdeq */
41   init_tarval_1 ();
42   /* initialize all modes an ir node can consist of */
43   init_mode ();
44   /* initialize tarvals, and floating point arithmetic */
45   init_tarval_2 ();
46   /* init graph construction */
47   init_irgraph();
48   /* kind of obstack initialization */
49   init_mangle ();
50   /* initalize all op codes an irnode can consist of */
51   init_op ();
52   /* called once for each run of this library */
53   init_cons (func);
54   /* Builds a construct allowing to access all information to be constructed
55      later. */
56   init_irprog ();
57 }