Changed implementation of tr module.
[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 #ifdef HAVE_CONFIG_H
9 # include <config.h>
10 #endif
11
12 # include <stdio.h>
13 # include "ident_t.h"
14 # include "firm.h"
15 # include "mangle.h"
16 # include "xp_help.h"
17 # include "irnode_t.h"
18 # include "tv_t.h"
19 # include "tpop_t.h"
20
21 void
22 init_firm (void)
23 {
24   /* register the character 'I' as variable for ident outputs. */
25   xprintf_register ('I', ident_print);
26   /* register the character 'v' as variable for tarval outputs. */
27   xprintf_register ('v', tarval_print);
28   /* register the character 'R' as variable for ir node outputs. */
29   xprintf_register ('R', ir_node_print);
30   /* initialize all ident stuff */
31   id_init ();
32   /* create the type kinds. */
33   init_tpop ();
34   /* create an obstack and put all tarvals in a pdeq */
35   tarval_init_1 ();
36   /* initialize all modes an ir node can consist of */
37   init_mode ();
38   /* initialize tarvals, and floating point arithmetic */
39   tarval_init_2 ();
40   /* kind of obstack initialization */
41   init_mangle ();
42   /* initalize all op codes an irnode can consist of */
43   init_op ();
44   /* called once for each run of this library, empty at this moment!!! */
45   init_cons ();
46   /* Builds a construct allowing to access all information to be constructed
47      later. */
48   init_irprog ();
49 }