-typedef struct _copy_opt_t {
- be_chordal_env_t *chordal_env;
- char *name; /**< ProgName__IrgName__RegClass */
- struct list_head units; /**< all units to optimize in specific order */
- cost_fct_t get_costs; /**< function ptr used to get costs for copies */
- struct obstack ob;
-} copy_opt_t;
-
-/**
- * A single unit of optimization. Lots of these form a copy-opt problem
- */
-typedef struct _unit_t {
- struct list_head units; /**< chain for all units */
- copy_opt_t *co; /**< the copy_opt this unit belongs to */
- int node_count; /**< size of the nodes array */
- ir_node **nodes; /**< [0] is the root-node, others are non interfering args of it. */
- int *costs; /**< costs[i] are arising, if nodes[i] has a different color */
- int inevitable_costs; /**< sum of costs of all args interfering with root */
- int all_nodes_costs; /**< sum of all costs[i] */
- int min_nodes_costs; /**< a lower bound for the costs in costs[], determined by a max indep. set */
- int sort_key; /**< maximum costs. controls the order of ou's in the struct list_head units. */
-
- /* for heuristic */
- struct list_head queue; /**< list of qn's sorted by weight of qn-mis */
-} unit_t;
-
-/* Helpers */
-#define get_arch_env(co) ((co)->chordal_env->main_env->arch_env)
-#define get_irg(co) ((co)->chordal_env->irg)
-#define get_irn_col(co, irn) \
- arch_register_get_index(arch_get_irn_register(get_arch_env(co), irn))
-#define set_irn_col(co, irn, col) \
- arch_set_irn_register(get_arch_env(co), irn, arch_register_for_index(co->chordal_env->cls, col))
-