- co = NULL;
- if (options.copymin_method != BE_CH_COPYMIN_NONE && options.copymin_method != BE_CH_COPYMIN_STAT) {
- co = new_copy_opt(&chordal_env, co_get_costs_exec_freq);
- co_build_ou_structure(co);
- co_build_graph_structure(co);
- if(be_copymin_stats) {
- ir_printf("%40F %20s\n", current_ir_graph, chordal_env.cls->name);
- printf("max copy costs: %d\n", co_get_max_copy_costs(co));
- printf("init copy costs: %d\n", co_get_copy_costs(co));
- printf("inevit copy costs: %d\n", co_get_inevit_copy_costs(co));
- printf("copy costs lower bound: %d\n", co_get_lower_bound(co));
- }
-
- /* Dump the interference graph in Appel's format. */
- if(options.dump_flags & BE_CH_DUMP_APPEL) {
- FILE *f = be_chordal_open(&chordal_env, "appel-", "apl");
- co_dump_appel_graph(co, f);
- fclose(f);
- }
- }
-
- switch(options.copymin_method) {
- case BE_CH_COPYMIN_HEUR1:
- co_solve_heuristic(co);
- break;
- case BE_CH_COPYMIN_HEUR2:
- co_solve_heuristic_new(co);
- break;
- case BE_CH_COPYMIN_HEUR3:
- co_solve_heuristic_java(co);
- break;
- case BE_CH_COPYMIN_PARK_MOON:
- co_solve_park_moon(co);
- break;
- case BE_CH_COPYMIN_STAT:
- co_compare_solvers(&chordal_env);
- break;
-#ifdef WITH_ILP
- case BE_CH_COPYMIN_ILP:
- co_solve_ilp2(co, 60.0);
- break;
-#endif /* WITH_ILP */
- case BE_CH_COPYMIN_NONE:
- default:
- break;
- }
-
- if (co) {
- if(be_copymin_stats) {
- printf("final copy costs : %d\n", co_get_copy_costs(co));
- }
- co_free_graph_structure(co);
- co_free_ou_structure(co);
- free_copy_opt(co);
- }