- Fix a few more problems when creating and emitting constants
[libfirm] / ir / be / becopyopt.h
index 23b497f..a36875b 100644 (file)
@@ -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);
 
 
 /**