X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbecopyopt.h;h=7e11ba32de324e62af9cf97babd48b2d3565a289;hb=b9d45e08e23bcf058fa8f2d9e18dd78e8cccd044;hp=23b497fc90143d22ae0f31c88449866dea8777f0;hpb=8105317384cd99ef55d8c052684a401b2484f64b;p=libfirm diff --git a/ir/be/becopyopt.h b/ir/be/becopyopt.h index 23b497fc9..7e11ba32d 100644 --- a/ir/be/becopyopt.h +++ b/ir/be/becopyopt.h @@ -105,7 +105,26 @@ int co_get_costs_exec_freq(const copy_opt_t *co, ir_node *root, ir_node* arg, in */ int co_get_costs_all_one(const copy_opt_t *co, ir_node *root, ir_node* arg, int pos); +/** + * Statistics over a copy optimization module. + */ +typedef struct { + ulong64 aff_edges; /**< number of affinity edges. */ + ulong64 aff_nodes; /**< number of nodes with incident affinity edges. */ + ulong64 aff_int; /**< number of affinity edges whose nodes also interfere. */ + ulong64 inevit_costs; /**< costs which cannot be evited (due to interfering affinities). */ + ulong64 max_costs; /**< all costs of the affinities. */ + ulong64 costs; /**< The costs of the current coloring. */ + ulong64 unsatisfied_edges; /**< The number of unequally colored affinity edges. */ +} co_complete_stats_t; +/** + * Collect statistics of a copy optimization module. + * @param co The copy optimization environment. + * @param stat Where to put the stats. + * @note This requires the graph info to be computed. + */ +void co_complete_stats(const copy_opt_t *co, co_complete_stats_t *stat); /**