-#define X(a) a, sizeof(a)-1
-
- /* enable statistics */
- status->enable = enable_options & FIRMSTAT_ENABLED;
-
- if (! status->enable)
- return;
-
- obstack_init(&status->cnts);
-
- /* create the hash-tables */
- status->irg_hash = new_pset(graph_cmp, 8);
- status->ir_op_hash = new_pset(opcode_cmp_2, 1);
-
- status->op_Phi0 = &_op_Phi0;
- status->op_PhiM = &_op_PhiM;
-
- if (enable_options & FIRMSTAT_COUNT_STRONG_OP) {
- /* build the pseudo-ops */
- _op_Phi0.code = get_next_ir_opcode();
- _op_Phi0.name = new_id_from_chars(X("Phi0"));
-
- _op_PhiM.code = get_next_ir_opcode();
- _op_PhiM.name = new_id_from_chars(X("PhiM"));
-
- _op_MulC.code = get_next_ir_opcode();
- _op_MulC.name = new_id_from_chars(X("MulC"));
-
- _op_DivC.code = get_next_ir_opcode();
- _op_DivC.name = new_id_from_chars(X("DivC"));
-
- _op_ModC.code = get_next_ir_opcode();
- _op_ModC.name = new_id_from_chars(X("ModC"));
-
- _op_DivModC.code = get_next_ir_opcode();
- _op_DivModC.name = new_id_from_chars(X("DivModC"));
-
- status->op_MulC = &_op_MulC;
- status->op_DivC = &_op_DivC;
- status->op_ModC = &_op_ModC;
- status->op_DivModC = &_op_DivModC;
- }
- else {
- status->op_MulC = NULL;
- status->op_DivC = NULL;
- status->op_ModC = NULL;
- status->op_DivModC = NULL;
- }
-
- /* register the dumper */
- stat_register_dumper(&simple_dumper);
-
- if (enable_options & FIRMSTAT_CSV_OUTPUT)
- stat_register_dumper(&csv_dumper);
-
- /* initialize the pattern hash */
- stat_init_pattern_history(enable_options & FIRMSTAT_PATTERN_ENABLED);
-#undef X
-}
-
-/* A new IR op is registered. */
-void stat_new_ir_op(const ir_op *op)
-{
- if (! status->enable)