added
[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
20 void
21 init_firm (void)
22 {
23   /* register the character 'I' as variable for ident outputs. */
24   xprintf_register ('I', ident_print);
25   /* register the character 'v' as variable for tarval outputs. */
26   xprintf_register ('v', tarval_print);
27   /* register the character 'R' as variable for ir node outputs. */
28   xprintf_register ('R', ir_node_print);
29   /* initialize all ident stuff */
30   id_init ();
31   /* create an obstack and put alle tarvals in a pdeq */
32   tarval_init_1 ();
33   /* initialize all modes an ir node can consist of */
34   init_mode ();
35   /* initialize tarvals, and floating point arithmetic */
36   tarval_init_2 ();
37   /* kind of obstack initialization */
38   init_mangle ();
39   /* initalize all op codes an irnode can consist of */
40   init_op ();
41   /* called once for each run of this library, empty at this moment!!! */
42   init_cons ();
43   /* Builds a construct allowing to access all information to be constructed
44      later. */
45   init_irprog ();
46 }