X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbecopyopt.h;h=a36875bcd38927565b805e6a6bdc028d3dabb0b8;hb=92c0ec3f39f7783295374a53eda866f97da2d52a;hp=23b497fc90143d22ae0f31c88449866dea8777f0;hpb=8105317384cd99ef55d8c052684a401b2484f64b;p=libfirm diff --git a/ir/be/becopyopt.h b/ir/be/becopyopt.h index 23b497fc9..a36875bcd 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 { + unsigned long long int aff_edges; /**< number of affinity edges. */ + unsigned long long int aff_nodes; /**< number of nodes with incident affinity edges. */ + unsigned long long int aff_int; /**< number of affinity edges whose nodes also interfere. */ + unsigned long long int inevit_costs; /**< costs which cannot be evited (due to interfering affinities). */ + unsigned long long int max_costs; /**< all costs of the affinities. */ + unsigned long long int costs; /**< The costs of the current coloring. */ + unsigned long long int 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); /**