3 * File name: ir/ir/firmstat.c
4 * Purpose: Statistics for Firm.
8 * Copyright: (c) 2004 Universität Karlsruhe
9 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
16 #ifdef FIRM_STATISTICS
22 #include "firmstat_t.h"
28 * need this to be static:
29 * Special pseudo Opcodes that we need to count some interesting cases
33 * The Phi0, a node that is created during SSA construction
35 static ir_op _op_Phi0;
37 /** The PhiM, just to count memorty Phi's. */
38 static ir_op _op_PhiM;
40 /** The Mul by Const node. */
41 static ir_op _op_MulC;
43 /** The Div by Const node. */
44 static ir_op _op_DivC;
46 /** The Div by Const node. */
47 static ir_op _op_ModC;
49 /** The Div by Const node. */
50 static ir_op _op_DivModC;
52 /* ---------------------------------------------------------------------------------- */
54 #define STAT_ENTER ++status->recursive
55 #define STAT_LEAVE --status->recursive
56 #define STAT_ENTER_SINGLE do { if (status->recursive > 0) return; ++status->recursive; } while (0)
61 static stat_info_t _status, *status = &_status;
64 * compare two elements of the opcode hash
66 static int opcode_cmp(const void *elt, const void *key)
68 const node_entry_t *e1 = elt;
69 const node_entry_t *e2 = key;
71 return e1->op->code - e2->op->code;
75 * compare two elements of the graph hash
77 static int graph_cmp(const void *elt, const void *key)
79 const graph_entry_t *e1 = elt;
80 const graph_entry_t *e2 = key;
82 return e1->irg != e2->irg;
86 * compare two elements of the optimization hash
88 static int opt_cmp(const void *elt, const void *key)
90 const opt_entry_t *e1 = elt;
91 const opt_entry_t *e2 = key;
93 return e1->op->code != e2->op->code;
97 * compare two elements of the block hash
99 static int block_cmp(const void *elt, const void *key)
101 const block_entry_t *e1 = elt;
102 const block_entry_t *e2 = key;
104 return e1->block_nr != e2->block_nr;
108 * compare two elements of the ir_op hash
110 static int opcode_cmp_2(const void *elt, const void *key)
112 const ir_op *e1 = elt;
113 const ir_op *e2 = key;
115 return e1->code != e2->code;
119 * clears all counter in a node_entry_t
121 static void opcode_clear_entry(node_entry_t *elem)
123 cnt_clr(&elem->cnt_alive);
124 cnt_clr(&elem->new_node);
125 cnt_clr(&elem->into_Id);
129 * Returns the associates node_entry_t for an ir_op
131 static node_entry_t *opcode_get_entry(const ir_op *op, pset *set)
138 elem = pset_find(set, &key, op->code);
142 elem = obstack_alloc(&status->cnts, sizeof(*elem));
145 opcode_clear_entry(elem);
149 return pset_insert(set, elem, op->code);
153 * Returns the associates ir_op for an opcode
155 static ir_op *opcode_find_entry(opcode code, pset *set)
160 return pset_find(set, &key, code);
164 * calculates a hash value for an irg
165 * Addresses are typically aligned at 32bit, so we ignore the lowest bits
167 static INLINE unsigned irg_hash(const ir_graph *irg)
169 return (unsigned)irg >> 3;
173 * clears all counter in a graph_entry_t
175 static void graph_clear_entry(graph_entry_t *elem, int all)
178 cnt_clr(&elem->cnt_walked);
179 cnt_clr(&elem->cnt_walked_blocks);
180 cnt_clr(&elem->cnt_was_inlined);
181 cnt_clr(&elem->cnt_got_inlined);
182 cnt_clr(&elem->cnt_strength_red);
184 cnt_clr(&elem->cnt_edges);
185 cnt_clr(&elem->cnt_all_calls);
186 cnt_clr(&elem->cnt_indirect_calls);
190 * Returns the acssociates graph_entry_t for an irg
192 static graph_entry_t *graph_get_entry(ir_graph *irg, pset *set)
200 elem = pset_find(set, &key, irg_hash(irg));
204 /* allocate a new one */
205 elem = obstack_alloc(&status->cnts, sizeof(*elem));
208 graph_clear_entry(elem, 1);
210 /* new hash table for opcodes here */
211 elem->opcode_hash = new_pset(opcode_cmp, 5);
212 elem->block_hash = new_pset(block_cmp, 5);
215 for (i = 0; i < sizeof(elem->opt_hash)/sizeof(elem->opt_hash[0]); ++i)
216 elem->opt_hash[i] = new_pset(opt_cmp, 4);
218 return pset_insert(set, elem, irg_hash(irg));
222 * clears all counter in an opt_entry_t
224 static void opt_clear_entry(opt_entry_t *elem)
226 cnt_clr(&elem->count);
230 * Returns the associates opt_entry_t for an ir_op
232 static opt_entry_t *opt_get_entry(const ir_op *op, pset *set)
239 elem = pset_find(set, &key, op->code);
243 elem = obstack_alloc(&status->cnts, sizeof(*elem));
245 /* clear new counter */
246 opt_clear_entry(elem);
250 return pset_insert(set, elem, op->code);
254 * clears all counter in a block_entry_t
256 static void block_clear_entry(block_entry_t *elem)
258 cnt_clr(&elem->cnt_nodes);
259 cnt_clr(&elem->cnt_edges);
260 cnt_clr(&elem->cnt_in_edges);
261 cnt_clr(&elem->cnt_out_edges);
265 * Returns the associates block_entry_t for an block
267 static block_entry_t *block_get_entry(long block_nr, pset *set)
272 key.block_nr = block_nr;
274 elem = pset_find(set, &key, block_nr);
278 elem = obstack_alloc(&status->cnts, sizeof(*elem));
280 /* clear new counter */
281 block_clear_entry(elem);
283 elem->block_nr = block_nr;
285 return pset_insert(set, elem, block_nr);
290 * Returns the ir_op for an IR-node,
291 * handles special cases and return pseudo op codes
293 static ir_op *stat_get_irn_op(ir_node *node)
295 ir_op *op = get_irn_op(node);
297 if (op->code == iro_Phi && get_irn_arity(node) == 0) {
298 /* special case, a Phi0 node, count on extra counter */
299 op = status->op_Phi0;
301 else if (op->code == iro_Phi && get_irn_mode(node) == mode_M) {
302 /* special case, a Memory Phi node, count on extra counter */
303 op = status->op_PhiM;
305 else if (op->code == iro_Mul &&
306 (get_irn_op(get_Mul_left(node)) == op_Const || get_irn_op(get_Mul_right(node)) == op_Const)) {
307 /* special case, a Multiply by a const, count on extra counter */
308 op = status->op_MulC ? status->op_MulC : op_Mul;
310 else if (op->code == iro_Div && get_irn_op(get_Div_right(node)) == op_Const) {
311 /* special case, a division by a const, count on extra counter */
312 op = status->op_DivC ? status->op_DivC : op_Div;
314 else if (op->code == iro_Mod && get_irn_op(get_Mod_right(node)) == op_Const) {
315 /* special case, a module by a const, count on extra counter */
316 op = status->op_ModC ? status->op_ModC : op_Mod;
318 else if (op->code == iro_DivMod && get_irn_op(get_DivMod_right(node)) == op_Const) {
319 /* special case, a division/modulo by a const, count on extra counter */
320 op = status->op_DivModC ? status->op_DivModC : op_DivMod;
327 * update the block counter
329 static void count_block_info(ir_node *node, graph_entry_t *graph)
331 ir_op *op = get_irn_op(node);
333 block_entry_t *b_entry;
336 /* check for block */
337 if (op == op_Block) {
338 arity = get_irn_arity(node);
339 b_entry = block_get_entry(get_irn_node_nr(node), graph->block_hash);
341 /* count all incoming edges */
342 for (i = 0; i < arity; ++i) {
343 ir_node *pred = get_irn_n(node, i);
344 ir_node *other_block = get_nodes_block(pred);
345 block_entry_t *b_entry_other = block_get_entry(get_irn_node_nr(other_block), graph->block_hash);
347 cnt_inc(&b_entry->cnt_in_edges); /* an edge coming from another block */
348 cnt_inc(&b_entry_other->cnt_out_edges);
352 else if (op == op_Call) {
356 block = get_nodes_block(node);
357 b_entry = block_get_entry(get_irn_node_nr(block), graph->block_hash);
359 /* we have a new nodes */
360 cnt_inc(&b_entry->cnt_nodes);
362 arity = get_irn_arity(node);
364 for (i = 0; i < arity; ++i) {
365 ir_node *pred = get_irn_n(node, i);
366 ir_node *other_block;
368 if (get_irn_op(pred) == op_Block)
371 other_block = get_nodes_block(pred);
373 if (other_block == block)
374 cnt_inc(&b_entry->cnt_edges); /* a in block edge */
376 block_entry_t *b_entry_other = block_get_entry(get_irn_node_nr(other_block), graph->block_hash);
378 cnt_inc(&b_entry->cnt_in_edges); /* an edge coming from another block */
379 cnt_inc(&b_entry_other->cnt_out_edges);
385 * update info on calls
387 static void update_call_stat(ir_node *call, graph_entry_t *graph)
389 ir_node *ptr = get_Call_ptr(call);
392 cnt_inc(&graph->cnt_all_calls);
394 /* found a call, is not a leaf function */
397 if (get_irn_op(ptr) == op_SymConst) {
398 if (get_SymConst_kind(ptr) == symconst_addr_ent) {
399 /* ok, we seems to know the entity */
400 ent = get_SymConst_entity(ptr);
402 if (get_entity_irg(ent) == graph->irg)
403 graph->is_recursive = 1;
408 cnt_inc(&graph->cnt_indirect_calls);
411 /* check, if it's a chain-call: Then, the call-block
412 * must dominate the end block. */
414 ir_node *curr = get_irg_end_block(graph->irg);
415 ir_node *block = get_nodes_block(call);
416 int depth = get_Block_dom_depth(block);
418 for (; curr != block && get_Block_dom_depth(curr) > depth;) {
419 curr = get_Block_idom(curr);
421 if (! curr || is_no_Block(curr))
426 graph->is_chain_call = 0;
431 * walker for reachable nodes count
433 static void update_node_stat(ir_node *node, void *env)
435 graph_entry_t *graph = env;
438 ir_op *op = stat_get_irn_op(node);
439 int arity = get_irn_arity(node);
441 entry = opcode_get_entry(op, graph->opcode_hash);
443 cnt_inc(&entry->cnt_alive);
444 cnt_add_i(&graph->cnt_edges, arity);
446 /* count block edges */
447 count_block_info(node, graph);
449 /* check for properties that depends on calls like recursion/leaf/indirect call */
450 if (get_irn_op(node) == op_Call)
451 update_call_stat(node, graph);
455 * called for every graph when the graph is either deleted or stat_finish
456 * is called, must recalculate all statistic info
458 static void update_graph_stat(graph_entry_t *global, graph_entry_t *graph)
462 /* clear first the alive counter in the graph */
463 for (entry = pset_first(graph->opcode_hash); entry; entry = pset_next(graph->opcode_hash)) {
464 cnt_clr(&entry->cnt_alive);
467 /* set pessimistic values */
469 graph->is_recursive = 0;
470 graph->is_chain_call = 1;
472 /* we need dominator info */
473 if (graph->irg != get_const_code_irg())
474 if (get_irg_dom_state(graph->irg) != dom_consistent)
475 compute_doms(graph->irg);
477 /* count the nodes in the graph */
478 irg_walk_graph(graph->irg, update_node_stat, NULL, graph);
481 entry = opcode_get_entry(op_Call, graph->opcode_hash);
483 /* check if we have more than 1 call */
484 if (cnt_gt(entry->cnt_alive, 1))
485 graph->is_chain_call = 0;
488 /* recursive functions are never chain calls, leafs don't have calls */
489 if (graph->is_recursive || graph->is_leaf)
490 graph->is_chain_call = 0;
492 /* assume we walk every graph only ONCE, we could sum here the global count */
493 for (entry = pset_first(graph->opcode_hash); entry; entry = pset_next(graph->opcode_hash)) {
494 node_entry_t *g_entry = opcode_get_entry(entry->op, global->opcode_hash);
496 /* update the node counter */
497 cnt_add(&g_entry->cnt_alive, &entry->cnt_alive);
500 /* update the edge counter */
501 cnt_add(&global->cnt_edges, &graph->cnt_edges);
507 static void stat_register_dumper(const dumper_t *dumper)
509 dumper_t *p = malloc(sizeof(*p));
514 p->next = status->dumper;
519 /* FIXME: memory leak */
525 static void dump_graph(graph_entry_t *entry)
529 for (dumper = status->dumper; dumper; dumper = dumper->next) {
530 if (dumper->dump_graph)
531 dumper->dump_graph(dumper, entry);
536 * initialise the dumper
538 static void dump_init(const char *name)
542 for (dumper = status->dumper; dumper; dumper = dumper->next) {
544 dumper->init(dumper, name);
551 static void dump_finish(void)
555 for (dumper = status->dumper; dumper; dumper = dumper->next) {
557 dumper->finish(dumper);
561 /* ---------------------------------------------------------------------- */
564 * helper: get an ir_op from an opcode
566 ir_op *stat_get_op_from_opcode(opcode code)
568 return opcode_find_entry(code, status->ir_op_hash);
571 /* initialize the statistics module. */
572 void init_stat(unsigned enable_options)
574 #define X(a) a, sizeof(a)-1
578 /* enable statistics */
579 status->enable = enable_options & FIRMSTAT_ENABLED;
581 if (! status->enable)
584 obstack_init(&status->cnts);
586 /* build the pseudo-ops */
587 _op_Phi0.code = --pseudo_id;
588 _op_Phi0.name = new_id_from_chars(X("Phi0"));
590 _op_PhiM.code = --pseudo_id;
591 _op_PhiM.name = new_id_from_chars(X("PhiM"));
593 _op_MulC.code = --pseudo_id;
594 _op_MulC.name = new_id_from_chars(X("MulC"));
596 _op_DivC.code = --pseudo_id;
597 _op_DivC.name = new_id_from_chars(X("DivC"));
599 _op_ModC.code = --pseudo_id;
600 _op_ModC.name = new_id_from_chars(X("ModC"));
602 _op_DivModC.code = --pseudo_id;
603 _op_DivModC.name = new_id_from_chars(X("DivModC"));
605 /* create the hash-tables */
606 status->irg_hash = new_pset(graph_cmp, 8);
607 status->ir_op_hash = new_pset(opcode_cmp_2, 1);
609 status->op_Phi0 = &_op_Phi0;
610 status->op_PhiM = &_op_PhiM;
612 if (enable_options & FIRMSTAT_COUNT_STRONG_OP) {
613 status->op_MulC = &_op_MulC;
614 status->op_DivC = &_op_DivC;
615 status->op_ModC = &_op_ModC;
616 status->op_DivModC = &_op_DivModC;
619 status->op_MulC = NULL;
620 status->op_DivC = NULL;
621 status->op_ModC = NULL;
622 status->op_DivModC = NULL;
625 /* register the dumper */
626 stat_register_dumper(&simple_dumper);
628 if (enable_options & FIRMSTAT_CSV_OUTPUT)
629 stat_register_dumper(&csv_dumper);
631 /* initialize the pattern hash */
632 stat_init_pattern_history(enable_options & FIRMSTAT_PATTERN_ENABLED);
636 /* A new IR op is registered. */
637 void stat_new_ir_op(const ir_op *op)
639 if (! status->enable)
644 graph_entry_t *graph = graph_get_entry(NULL, status->irg_hash);
646 /* execute for side effect :-) */
647 opcode_get_entry(op, graph->opcode_hash);
649 pset_insert(status->ir_op_hash, op, op->code);
654 /* An IR op is freed. */
655 void stat_free_ir_op(const ir_op *op)
657 if (! status->enable)
666 /* A new node is created. */
667 void stat_new_node(ir_node *node)
669 if (! status->enable)
672 /* do NOT count during dead node elimination */
673 if (status->in_dead_node_elim > 0)
679 graph_entry_t *graph;
680 ir_op *op = stat_get_irn_op(node);
682 /* increase global value */
683 graph = graph_get_entry(NULL, status->irg_hash);
684 entry = opcode_get_entry(op, graph->opcode_hash);
685 cnt_inc(&entry->new_node);
687 /* increase local value */
688 graph = graph_get_entry(current_ir_graph, status->irg_hash);
689 entry = opcode_get_entry(op, graph->opcode_hash);
690 cnt_inc(&entry->new_node);
695 /* A node is changed into a Id node */
696 void stat_turn_into_id(ir_node *node)
698 if (! status->enable)
704 graph_entry_t *graph;
705 ir_op *op = stat_get_irn_op(node);
707 /* increase global value */
708 graph = graph_get_entry(NULL, status->irg_hash);
709 entry = opcode_get_entry(op, graph->opcode_hash);
710 cnt_inc(&entry->into_Id);
712 /* increase local value */
713 graph = graph_get_entry(current_ir_graph, status->irg_hash);
714 entry = opcode_get_entry(op, graph->opcode_hash);
715 cnt_inc(&entry->into_Id);
720 /* A new graph was created */
721 void stat_new_graph(ir_graph *irg, entity *ent)
723 if (! status->enable)
728 /* execute for side effect :-) */
729 graph_entry_t * graph = graph_get_entry(irg, status->irg_hash);
732 graph->is_deleted = 0;
734 graph->is_recursive = 0;
735 graph->is_chain_call = 0;
741 * A graph will be deleted
743 void stat_free_graph(ir_graph *irg)
745 if (! status->enable)
750 graph_entry_t *graph = graph_get_entry(irg, status->irg_hash);
751 graph_entry_t *global = graph_get_entry(NULL, status->irg_hash);
753 graph->is_deleted = 1;
755 /* count the nodes of the graph yet, it will be destroyed later */
756 update_graph_stat(global, graph);
758 /* count the DAG's */
759 // count_dags_in_graph(global, graph);
761 /* calculate the pattern */
762 stat_calc_pattern_history(irg);
768 * A walk over a graph is initiated. Do not count walks from statistic code.
770 void stat_irg_walk(ir_graph *irg, void *pre, void *post)
772 if (! status->enable)
777 graph_entry_t *graph = graph_get_entry(irg, status->irg_hash);
779 cnt_inc(&graph->cnt_walked);
785 * A walk over a graph in block-wise order is initiated. Do not count walks from statistic code.
787 void stat_irg_walk_blkwise(ir_graph *irg, void *pre, void *post)
789 /* for now, do NOT differentiate between blockwise and normal */
790 stat_irg_walk(irg, pre, post);
794 * A walk over the graph's blocks is initiated. Do not count walks from statistic code.
796 void stat_irg_block_walk(ir_graph *irg, const ir_node *node, void *pre, void *post)
798 if (! status->enable)
803 graph_entry_t *graph = graph_get_entry(irg, status->irg_hash);
805 cnt_inc(&graph->cnt_walked_blocks);
811 * called for every node that is removed due to an optimization
813 static void removed_due_opt(ir_node *n, pset *set)
815 ir_op *op = stat_get_irn_op(n);
816 opt_entry_t *entry = opt_get_entry(op, set);
818 /* increase global value */
819 cnt_inc(&entry->count);
823 * Some nodes were optimized into some others due to an optimization
825 void stat_merge_nodes(
826 ir_node **new_node_array, int new_num_entries,
827 ir_node **old_node_array, int old_num_entries,
830 if (! status->enable)
836 graph_entry_t *graph = graph_get_entry(current_ir_graph, status->irg_hash);
838 if (status->reassoc_run)
839 opt = STAT_OPT_REASSOC;
841 for (i = 0; i < old_num_entries; ++i) {
842 for (j = 0; j < new_num_entries; ++j)
843 if (old_node_array[i] == new_node_array[j])
846 /* nodes might be in new and old, these are NOT removed */
847 if (j >= new_num_entries) {
848 removed_due_opt(old_node_array[i], graph->opt_hash[opt]);
856 * reassociation started/stopped.
858 void stat_reassociate(int flag)
860 if (! status->enable)
865 status->reassoc_run = flag;
871 * A node was lowered into other nodes
873 void stat_lower(ir_node *node)
875 if (! status->enable)
880 graph_entry_t *graph = graph_get_entry(current_ir_graph, status->irg_hash);
882 removed_due_opt(node, graph->opt_hash[STAT_LOWERED]);
888 * A graph was inlined
890 void stat_inline(ir_node *call, ir_graph *called_irg)
892 if (! status->enable)
897 ir_graph *irg = get_irn_irg(call);
898 graph_entry_t *i_graph = graph_get_entry(called_irg, status->irg_hash);
899 graph_entry_t *graph = graph_get_entry(irg, status->irg_hash);
901 cnt_inc(&graph->cnt_got_inlined);
902 cnt_inc(&i_graph->cnt_was_inlined);
908 * A graph with tail-recursions was optimized.
910 void stat_tail_rec(ir_graph *irg)
912 if (! status->enable)
922 * Strength reduction was performed on an iteration variable.
924 void stat_strength_red(ir_graph *irg, ir_node *strong, ir_node *cmp)
926 if (! status->enable)
931 graph_entry_t *graph = graph_get_entry(irg, status->irg_hash);
932 cnt_inc(&graph->cnt_strength_red);
934 removed_due_opt(strong, graph->opt_hash[STAT_OPT_STRENGTH_RED]);
940 * Start the dead node elimination.
942 void stat_dead_node_elim_start(ir_graph *irg)
944 if (! status->enable)
947 ++status->in_dead_node_elim;
951 * Stops the dead node elimination.
953 void stat_dead_node_elim_stop(ir_graph *irg)
955 if (! status->enable)
958 --status->in_dead_node_elim;
962 * A multiply was replaced by a series of Shifts/Adds/Subs
964 void stat_arch_dep_replace_mul_with_shifts(ir_node *mul)
966 if (! status->enable)
971 graph_entry_t *graph = graph_get_entry(current_ir_graph, status->irg_hash);
972 removed_due_opt(mul, graph->opt_hash[STAT_OPT_ARCH_DEP]);
978 * A division was replaced by a series of Shifts/Muls
980 void stat_arch_dep_replace_div_by_const(ir_node *div)
982 if (! status->enable)
987 graph_entry_t *graph = graph_get_entry(current_ir_graph, status->irg_hash);
988 removed_due_opt(div, graph->opt_hash[STAT_OPT_ARCH_DEP]);
994 * A modulo was replaced by a series of Shifts/Muls
996 void stat_arch_dep_replace_mod_by_const(ir_node *mod)
998 if (! status->enable)
1003 graph_entry_t *graph = graph_get_entry(current_ir_graph, status->irg_hash);
1004 removed_due_opt(mod, graph->opt_hash[STAT_OPT_ARCH_DEP]);
1010 * A DivMod was replaced by a series of Shifts/Muls
1012 void stat_arch_dep_replace_DivMod_by_const(ir_node *divmod)
1014 if (! status->enable)
1019 graph_entry_t *graph = graph_get_entry(current_ir_graph, status->irg_hash);
1020 removed_due_opt(divmod, graph->opt_hash[STAT_OPT_ARCH_DEP]);
1025 /* Finish the statistics */
1026 void stat_finish(const char *name)
1028 if (! status->enable)
1033 graph_entry_t *entry;
1034 graph_entry_t *global = graph_get_entry(NULL, status->irg_hash);
1038 /* dump per graph */
1039 for (entry = pset_first(status->irg_hash); entry; entry = pset_next(status->irg_hash)) {
1041 if (entry->irg == NULL) {
1042 /* special entry for the global count */
1046 if (! entry->is_deleted) {
1047 /* the graph is still alive, count the nodes on it */
1048 update_graph_stat(global, entry);
1050 /* count the DAG's */
1051 // count_dags_in_graph(global, entry);
1053 /* calculate the pattern */
1054 stat_calc_pattern_history(entry->irg);
1059 /* clear the counter that are not accumulated */
1060 graph_clear_entry(entry, 0);
1067 stat_finish_pattern_history();
1069 /* clear the global counter here */
1071 node_entry_t *entry;
1073 for (entry = pset_first(global->opcode_hash); entry; entry = pset_next(global->opcode_hash)) {
1074 opcode_clear_entry(entry);
1076 /* clear all global counter */
1077 graph_clear_entry(global, 1);
1081 // status->enable = 0;
1088 /* need this for prototypes */
1089 #define FIRM_STATISTICS
1090 #include "firmstat.h"
1092 void init_stat(unsigned enable_options) {}
1094 void stat_finish(const char *name) {}
1096 void stat_new_ir_op(const ir_op *op) {}
1098 void stat_free_ir_op(const ir_op *op) {}
1100 void stat_new_node(ir_node *node) {}
1102 void stat_turn_into_id(ir_node *node) {}
1104 void stat_new_graph(ir_graph *irg, entity *ent) {}
1106 void stat_free_graph(ir_graph *irg) {}
1108 void stat_irg_walk(ir_graph *irg, void *pre, void *post) {}
1110 void stat_irg_block_walk(ir_graph *irg, const ir_node *node, void *pre, void *post) {}
1112 void stat_merge_nodes(
1113 ir_node **new_node_array, int new_num_entries,
1114 ir_node **old_node_array, int old_num_entries,
1115 stat_opt_kind opt) {}
1117 void stat_reassociate(int start) {}
1119 void stat_lower(ir_node *node) {}
1121 void stat_inline(ir_node *call, ir_graph *irg) {}
1123 void stat_tail_rec(ir_graph *irg) {}
1125 void stat_strength_red(ir_graph *irg, ir_node *strong, ir_node *cmp) {}
1127 void stat_dead_node_elim_start(ir_graph *irg) {}
1129 void stat_dead_node_elim_stop(ir_graph *irg) {}
1131 void stat_arch_dep_replace_mul_with_shifts(ir_node *mul) {}
1133 void stat_arch_dep_replace_div_by_const(ir_node *div) {}
1135 void stat_arch_dep_replace_mod_by_const(ir_node *mod) {}
1137 void stat_arch_dep_replace_DivMod_by_const(ir_node *divmod) {}