-typedef struct _copy_opt_t {
- ir_graph *irg; /**< the irg to process */
- const arch_isa_if_t *isa;
- const arch_register_class_t *cls; /**< the registerclass to optimize */
- struct list_head units; /**< all units to optimize in right oreder */
- pset *roots; /**< used only temporary for detecting multiple appends */
- struct obstack ob;
-} copy_opt_t;
+typedef struct {
+ unsigned long long aff_edges; /**< number of affinity edges. */
+ unsigned long long aff_nodes; /**< number of nodes with incident affinity edges. */
+ unsigned long long aff_int; /**< number of affinity edges whose nodes also interfere. */
+ unsigned long long inevit_costs; /**< costs which cannot be evited (due to interfering affinities). */
+ unsigned long long max_costs; /**< all costs of the affinities. */
+ unsigned long long costs; /**< The costs of the current coloring. */
+ unsigned long long 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);