added average calculation of distribution table
[libfirm] / ir / common / firm.c
index 1eb4b2e..75360cb 100644 (file)
@@ -81,15 +81,15 @@ init_firm(const firm_parameter_t *param)
   /* initialize all ident stuff */
   init_ident(def_params.id_if, 1024);
   /* initialize Firm hooks */
-  init_hooks();
+  firm_init_hooks();
   /* enhanced statistics, need idents and hooks */
-  init_stat(def_params.enable_statistics);
+  firm_init_stat(def_params.enable_statistics);
   /* Edges need hooks. */
   init_edges();
   /* create the type kinds. */
   init_tpop();
   /* create an obstack and put all tarvals in a pdeq */
-  init_tarval_1();
+  init_tarval_1(0l);
   /* Builds a basic program representation, so modes can be added. */
   init_irprog_1();
   /* initialize all modes an ir node can consist of */
@@ -159,10 +159,10 @@ void free_firm(void) {
   for (i = get_irp_n_types() - 1; i >= 0; --i)
     free_type(get_irp_type(i));
 
+  finish_op();
   free_ir_prog();
 
   finish_tarval();
-  finish_op();
   finish_mode();
   finish_tpop();
   finish_ident();