2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief PBQP based register allocation.
9 * @author Thomas Bersch
13 /* miscellaneous includes */
21 #include "iredges_t.h"
26 #include "execfreq_t.h"
27 #include "bipartite.h"
29 /* libfirm/ir/be includes */
34 #include "bechordal_common.h"
35 #include "bechordal.h"
36 #include "bechordal_t.h"
37 #include "becopyopt_t.h"
51 #include "heuristical_co.h"
52 #include "heuristical_co_ld.h"
54 #include "html_dumper.h"
55 #include "pbqp_node_t.h"
56 #include "pbqp_node.h"
57 #include "pbqp_edge_t.h"
61 #define USE_BIPARTIT_MATCHING 0
62 #define DO_USEFUL_OPT 1
65 static int use_exec_freq = true;
66 static int use_late_decision = false;
68 typedef struct be_pbqp_alloc_env_t {
69 pbqp_t *pbqp_inst; /**< PBQP instance for register allocation */
70 ir_graph *irg; /**< The graph under examination. */
71 const arch_register_class_t *cls; /**< Current processed register class */
73 bitset_t const *allocatable_regs;
74 pbqp_matrix_t *ife_matrix_template;
75 pbqp_matrix_t *aff_matrix_template;
77 unsigned *restr_nodes;
78 unsigned *ife_edge_num;
79 ir_execfreq_int_factors execfreq_factors;
80 be_chordal_env_t *env;
81 } be_pbqp_alloc_env_t;
84 #define insert_edge(pbqp, src_node, trg_node, template_matrix) (add_edge_costs(pbqp, get_irn_idx(src_node), get_irn_idx(trg_node), pbqp_matrix_copy(pbqp, template_matrix)))
85 #define get_free_regs(restr_nodes, cls, irn) (arch_register_class_n_regs(cls) - restr_nodes[get_irn_idx(irn)])
87 static const lc_opt_table_entry_t options[] = {
88 LC_OPT_ENT_BOOL("exec_freq", "use exec_freq", &use_exec_freq),
89 LC_OPT_ENT_BOOL("late_decision", "use late decision for register allocation", &use_late_decision),
94 static FILE *my_open(const be_chordal_env_t *env, const char *prefix, const char *suffix)
101 const char *cup_name = be_get_irg_main_env(env->irg)->cup_name;
103 n = strlen(cup_name);
104 tu_name = XMALLOCN(char, n + 1);
105 strcpy(tu_name, cup_name);
106 for (i = 0; i < n; ++i)
107 if (tu_name[i] == '.')
110 ir_snprintf(buf, sizeof(buf), "%s%s_%F_%s%s", prefix, tu_name, env->irg, env->cls->name, suffix);
112 result = fopen(buf, "wt");
113 if (result == NULL) {
114 panic("Couldn't open '%s' for writing.", buf);
122 static void create_pbqp_node(be_pbqp_alloc_env_t *pbqp_alloc_env, ir_node *irn)
124 arch_register_class_t const *const cls = pbqp_alloc_env->cls;
125 pbqp_t *const pbqp_inst = pbqp_alloc_env->pbqp_inst;
126 bitset_t const *const allocatable_regs = pbqp_alloc_env->allocatable_regs;
127 unsigned const colors_n = arch_register_class_n_regs(cls);
128 unsigned cntConstrains = 0;
130 /* create costs vector depending on register constrains */
131 vector_t *costs_vector = vector_alloc(pbqp_inst, colors_n);
133 /* set costs depending on register constrains */
135 for (idx = 0; idx < colors_n; idx++) {
136 const arch_register_req_t *req = arch_get_irn_register_req(irn);
137 const arch_register_t *reg = arch_register_for_index(cls, idx);
138 if (!bitset_is_set(allocatable_regs, idx)
139 || !arch_reg_is_allocatable(req, reg)) {
141 vector_set(costs_vector, idx, INF_COSTS);
146 /* add vector to pbqp node */
147 add_node_costs(pbqp_inst, get_irn_idx(irn), costs_vector);
148 pbqp_alloc_env->restr_nodes[get_irn_idx(irn)] = cntConstrains;
151 static void insert_ife_edge(be_pbqp_alloc_env_t *pbqp_alloc_env, ir_node *src_node, ir_node *trg_node)
153 pbqp_t *pbqp = pbqp_alloc_env->pbqp_inst;
154 const arch_register_class_t *cls = pbqp_alloc_env->cls;
155 pbqp_matrix_t *ife_matrix_template = pbqp_alloc_env->ife_matrix_template;
156 unsigned *restr_nodes = pbqp_alloc_env->restr_nodes;
158 if (get_edge(pbqp, get_irn_idx(src_node), get_irn_idx(trg_node)) == NULL) {
160 /* increase ife edge counter */
161 pbqp_alloc_env->ife_edge_num[get_irn_idx(src_node)]++;
162 pbqp_alloc_env->ife_edge_num[get_irn_idx(trg_node)]++;
164 #if DO_USEFUL_OPT || USE_BIPARTIT_MATCHING
165 /* do useful optimization to speed up pbqp solving (we can do this because we know our matrix) */
166 if (get_free_regs(restr_nodes, cls, src_node) == 1 && get_free_regs(restr_nodes, cls, trg_node) == 1) {
167 assert(vector_get_min_index(get_node(pbqp, get_irn_idx(src_node))->costs) !=
168 vector_get_min_index(get_node(pbqp, get_irn_idx(trg_node))->costs) &&
169 "Interfering nodes must not have the same register!");
172 if (get_free_regs(restr_nodes, cls, src_node) == 1 || get_free_regs(restr_nodes, cls, trg_node) == 1) {
173 if (get_free_regs(restr_nodes, cls, src_node) == 1) {
174 unsigned idx = vector_get_min_index(get_node(pbqp, get_irn_idx(src_node))->costs);
175 vector_set(get_node(pbqp, get_irn_idx(trg_node))->costs, idx, INF_COSTS);
178 unsigned idx = vector_get_min_index(get_node(pbqp, get_irn_idx(trg_node))->costs);
179 vector_set(get_node(pbqp, get_irn_idx(src_node))->costs, idx, INF_COSTS);
184 /* insert interference edge */
185 insert_edge(pbqp, src_node, trg_node, ife_matrix_template);
189 static void insert_afe_edge(be_pbqp_alloc_env_t *pbqp_alloc_env, ir_node *src_node, ir_node *trg_node, int pos)
191 pbqp_t *pbqp = pbqp_alloc_env->pbqp_inst;
192 const arch_register_class_t *cls = pbqp_alloc_env->cls;
193 unsigned *restr_nodes = pbqp_alloc_env->restr_nodes;
194 pbqp_matrix_t *afe_matrix = pbqp_matrix_alloc(pbqp, arch_register_class_n_regs(cls), arch_register_class_n_regs(cls));
195 unsigned colors_n = arch_register_class_n_regs(cls);
197 if (get_edge(pbqp, get_irn_idx(src_node), get_irn_idx(trg_node)) == NULL) {
199 /* get exec_freq for copy_block */
200 ir_node *root_bl = get_nodes_block(src_node);
201 ir_node *copy_bl = is_Phi(src_node) ? get_Block_cfgpred_block(root_bl, pos) : root_bl;
202 int res = get_block_execfreq_int(&pbqp_alloc_env->execfreq_factors, copy_bl);
204 /* create afe-matrix */
206 for (row = 0; row < colors_n; row++) {
207 for (col = 0; col < colors_n; col++) {
209 pbqp_matrix_set(afe_matrix, row, col, (num)res);
214 afe_matrix = pbqp_alloc_env->aff_matrix_template;
216 #if DO_USEFUL_OPT || USE_BIPARTIT_MATCHING
217 /* do useful optimization to speed up pbqp solving */
218 if (get_free_regs(restr_nodes, cls, src_node) == 1 && get_free_regs(restr_nodes, cls, trg_node) == 1) {
221 if (get_free_regs(restr_nodes, cls, src_node) == 1 || get_free_regs(restr_nodes, cls, trg_node) == 1) {
222 if (get_free_regs(restr_nodes, cls, src_node) == 1) {
223 unsigned regIdx = vector_get_min_index(get_node(pbqp, get_irn_idx(src_node))->costs);
224 vector_add_matrix_col(get_node(pbqp, get_irn_idx(trg_node))->costs, afe_matrix, regIdx);
227 unsigned regIdx = vector_get_min_index(get_node(pbqp, get_irn_idx(trg_node))->costs);
228 vector_add_matrix_col(get_node(pbqp, get_irn_idx(src_node))->costs, afe_matrix, regIdx);
233 /* insert interference edge */
234 insert_edge(pbqp, src_node, trg_node, afe_matrix);
238 static void create_affinity_edges(ir_node *irn, void *env)
240 be_pbqp_alloc_env_t *pbqp_alloc_env = (be_pbqp_alloc_env_t*)env;
241 const arch_register_class_t *cls = pbqp_alloc_env->cls;
242 const arch_register_req_t *req = arch_get_irn_register_req(irn);
246 if (is_Phi(irn)) { /* Phis */
247 for (pos = 0, max = get_irn_arity(irn); pos < max; ++pos) {
248 ir_node *arg = get_irn_n(irn, pos);
250 if (!arch_irn_consider_in_reg_alloc(cls, arg))
253 /* no edges to itself */
258 insert_afe_edge(pbqp_alloc_env, irn, arg, pos);
261 else if (is_Perm_Proj(irn)) { /* Perms */
262 ir_node *arg = get_Perm_src(irn);
263 if (!arch_irn_consider_in_reg_alloc(cls, arg))
266 insert_afe_edge(pbqp_alloc_env, irn, arg, -1);
267 } else if (arch_register_req_is(req, should_be_same)) {
268 const unsigned other = req->other_same;
271 for (i = 0; 1U << i <= other; ++i) {
272 if (other & (1U << i)) {
273 ir_node *other = get_irn_n(skip_Proj(irn), i);
274 if (!arch_irn_consider_in_reg_alloc(cls, other))
277 /* no edges to itself */
282 insert_afe_edge(pbqp_alloc_env, irn, other, i);
288 static void create_pbqp_coloring_instance(ir_node *block, void *data)
290 be_pbqp_alloc_env_t *pbqp_alloc_env = (be_pbqp_alloc_env_t*)data;
291 be_lv_t *lv = pbqp_alloc_env->lv;
292 const arch_register_class_t *cls = pbqp_alloc_env->cls;
293 plist_t *rpeo = pbqp_alloc_env->rpeo;
294 pbqp_t *pbqp_inst = pbqp_alloc_env->pbqp_inst;
295 plist_t *temp_list = plist_new();
297 ir_nodeset_t live_nodes;
298 #if USE_BIPARTIT_MATCHING
299 int *assignment = ALLOCAN(int, cls->n_regs);
301 unsigned *restr_nodes = pbqp_alloc_env->restr_nodes;
302 pqueue_t *restr_nodes_queue = new_pqueue();
303 pqueue_t *queue = new_pqueue();
304 plist_t *sorted_list = plist_new();
305 ir_node *last_element = NULL;
308 /* first, determine the pressure */
309 /* (this is only for compatibility with copymin optimization, it's not needed for pbqp coloring) */
310 create_borders(block, pbqp_alloc_env->env);
312 /* calculate living nodes for the first step */
313 ir_nodeset_init(&live_nodes);
314 be_liveness_end_of_block(lv, cls, block, &live_nodes);
316 /* create pbqp nodes, interference edges and reverse perfect elimination order */
317 sched_foreach_reverse(block, irn) {
318 be_foreach_value(irn, value,
319 if (!arch_irn_consider_in_reg_alloc(cls, value))
322 /* create pbqp source node if it dosn't exist */
323 if (!get_node(pbqp_inst, get_irn_idx(value)))
324 create_pbqp_node(pbqp_alloc_env, value);
326 /* create nodes and interference edges */
327 foreach_ir_nodeset(&live_nodes, live, iter) {
328 /* create pbqp source node if it dosn't exist */
329 if (!get_node(pbqp_inst, get_irn_idx(live)))
330 create_pbqp_node(pbqp_alloc_env, live);
332 /* no edges to itself */
336 insert_ife_edge(pbqp_alloc_env, value, live);
340 /* get living nodes for next step */
342 be_liveness_transfer(cls, irn, &live_nodes);
345 #if USE_BIPARTIT_MATCHING
346 if (get_irn_mode(irn) == mode_T) {
347 unsigned clique_size = 0;
348 unsigned n_alloc = 0;
349 pbqp_node *clique[cls->n_regs];
350 bipartite_t *bp = bipartite_new(cls->n_regs, cls->n_regs);
352 /* add all proj after a perm to clique */
353 foreach_out_edge(irn, edge) {
354 ir_node *proj = get_edge_src_irn(edge);
356 /* ignore node if it is not necessary for register allocation */
357 if (!arch_irn_consider_in_reg_alloc(cls, proj))
360 /* insert pbqp node into temp rpeo list of this block */
361 plist_insert_front(temp_list, get_node(pbqp_inst, get_irn_idx(proj)));
363 if(is_Perm_Proj(proj)) {
364 /* add proj to clique */
365 pbqp_node *clique_member = get_node(pbqp_inst,proj->node_idx);
366 vector *costs = clique_member->costs;
369 clique[clique_size] = clique_member;
371 for(idx = 0; idx < costs->len; idx++) {
372 if(costs->entries[idx].data != INF_COSTS) {
373 bipartite_add(bp, clique_size, idx);
377 /* increase node counter */
383 if(clique_size > 0) {
384 plist_element_t *listElement;
385 foreach_plist(temp_list, listElement) {
386 pbqp_node *clique_candidate = listElement->data;
388 bool isMember = true;
390 /* clique size not bigger then register class size */
391 if(clique_size >= cls->n_regs) break;
393 for(idx = 0; idx < clique_size; idx++) {
394 pbqp_node *member = clique[idx];
396 if(member == clique_candidate) {
401 if(get_edge(pbqp_inst, member->index, clique_candidate->index) == NULL && get_edge(pbqp_inst, clique_candidate->index, member->index) == NULL) {
407 /* goto next list element if current node is not a member of the clique */
408 if(!isMember) { continue; }
410 /* add candidate to clique */
411 clique[clique_size] = clique_candidate;
413 vector *costs = clique_candidate->costs;
414 for(idx = 0; idx < costs->len; idx++) {
415 if(costs->entries[idx].data != INF_COSTS) {
416 bipartite_add(bp, clique_size, idx);
420 /* increase node counter */
425 /* solve bipartite matching */
426 bipartite_matching(bp, assignment);
429 unsigned nodeIdx = 0;
430 for(nodeIdx = 0; nodeIdx < clique_size; nodeIdx++) {
431 vector *costs = clique[nodeIdx]->costs;
433 for(idx = 0; idx < (int)costs->len; idx++) {
434 if(assignment[nodeIdx] != idx) {
435 costs->entries[idx].data = INF_COSTS;
438 assert(assignment[nodeIdx] >= 0 && "there must have been a register assigned (node not register pressure faithful?)");
445 if (arch_irn_consider_in_reg_alloc(cls, irn)) {
446 plist_insert_front(temp_list, get_node(pbqp_inst, get_irn_idx(irn)));
450 /* order nodes for perfect elimination order */
451 if (get_irn_mode(irn) == mode_T) {
452 bool allHaveIFEdges = true;
453 foreach_out_edge(irn, edge) {
454 ir_node *proj = get_edge_src_irn(edge);
455 if (!arch_irn_consider_in_reg_alloc(cls, proj))
458 /* insert proj node into priority queue (descending by the number of interference edges) */
459 if (get_free_regs(restr_nodes, cls, proj) <= 4) {
460 pqueue_put(restr_nodes_queue, proj, pbqp_alloc_env->ife_edge_num[get_irn_idx(proj)]);
463 pqueue_put(queue, proj, pbqp_alloc_env->ife_edge_num[get_irn_idx(proj)]);
466 /* skip last step if there is no last_element */
467 if(last_element == NULL)
470 /* check if proj has an if edge to last_element (at this time pbqp contains only if edges) */
471 if(get_edge(pbqp_inst, proj->node_idx, last_element->node_idx) == NULL && get_edge(pbqp_inst, last_element->node_idx, proj->node_idx) == NULL) {
472 allHaveIFEdges = false; /* there is no if edge between proj and last_element */
476 if(last_element != NULL && allHaveIFEdges) {
477 if (get_free_regs(restr_nodes, cls, last_element) <= 4) {
478 pqueue_put(restr_nodes_queue, last_element, pbqp_alloc_env->ife_edge_num[get_irn_idx(last_element)]);
481 pqueue_put(queue, last_element, pbqp_alloc_env->ife_edge_num[get_irn_idx(last_element)]);
483 plist_erase(temp_list, plist_find_value(temp_list, get_node(pbqp_inst, last_element->node_idx)));
487 /* first insert all restricted proj nodes */
488 while (!pqueue_empty(restr_nodes_queue)) {
489 ir_node *node = (ir_node*)pqueue_pop_front(restr_nodes_queue);
490 plist_insert_front(sorted_list, get_node(pbqp_inst, get_irn_idx(node)));
493 /* insert proj nodes descending by their number of interference edges */
494 while (!pqueue_empty(queue)) {
495 ir_node *node = (ir_node*)pqueue_pop_front(queue);
496 plist_insert_front(sorted_list, get_node(pbqp_inst, get_irn_idx(node)));
499 /* invert sorted list */
500 foreach_plist(sorted_list, el) {
501 plist_insert_front(temp_list, el->data);
504 plist_clear(sorted_list);
508 if (arch_irn_consider_in_reg_alloc(cls, irn)) {
509 // remember last colorable node
511 plist_insert_front(temp_list, get_node(pbqp_inst, get_irn_idx(irn)));
514 // node not colorable, so ignore it
521 /* add the temp rpeo list of this block to the global reverse perfect elimination order list*/
522 foreach_plist(temp_list, el) {
523 plist_insert_back(rpeo, el->data);
526 /* free reserved memory */
527 ir_nodeset_destroy(&live_nodes);
528 plist_free(temp_list);
529 #if USE_BIPARTIT_MATCHING
531 plist_free(sorted_list);
533 del_pqueue(restr_nodes_queue);
537 static void insert_perms(ir_node *block, void *data)
539 be_chordal_env_t *env = (be_chordal_env_t*)data;
541 sched_foreach_safe(block, irn) {
542 be_insn_t *insn = be_scan_insn(env, irn);
544 pre_process_constraints(env, &insn);
548 static void be_pbqp_coloring(be_chordal_env_t *env)
550 ir_graph *irg = env->irg;
551 const arch_register_class_t *cls = env->cls;
553 plist_element_t *element = NULL;
554 unsigned colors_n = arch_register_class_n_regs(cls);
555 be_pbqp_alloc_env_t pbqp_alloc_env;
558 pbqp_matrix_t *ife_matrix;
564 ir_timer_t *t_ra_pbqp_alloc_create = ir_timer_new();
565 ir_timer_t *t_ra_pbqp_alloc_solve = ir_timer_new();
566 ir_timer_t *t_ra_pbqp_alloc_create_aff = ir_timer_new();
568 printf("#### ----- === Allocating registers of %s (%s) ===\n", cls->name, get_entity_name(get_irg_entity(irg)));
570 be_assure_live_sets(irg);
571 lv = be_get_irg_liveness(irg);
575 dom_tree_walk_irg(irg, insert_perms, NULL, env);
577 /* dump graph after inserting perms */
578 if (env->opts->dump_flags & BE_CH_DUMP_CONSTR) {
580 snprintf(buf, sizeof(buf), "%s-constr", cls->name);
581 dump_ir_graph(irg, buf);
584 ir_calculate_execfreq_int_factors(&pbqp_alloc_env.execfreq_factors, irg);
586 /* initialize pbqp allocation data structure */
587 pbqp_alloc_env.pbqp_inst = alloc_pbqp(get_irg_last_idx(irg)); /* initialize pbqp instance */
588 pbqp_alloc_env.cls = cls;
589 pbqp_alloc_env.irg = irg;
590 pbqp_alloc_env.lv = lv;
591 pbqp_alloc_env.allocatable_regs = env->allocatable_regs;
592 pbqp_alloc_env.rpeo = plist_new();
593 pbqp_alloc_env.restr_nodes = XMALLOCNZ(unsigned, get_irg_last_idx(irg));
594 pbqp_alloc_env.ife_edge_num = XMALLOCNZ(unsigned, get_irg_last_idx(irg));
595 pbqp_alloc_env.env = env;
597 /* create costs matrix template for interference edges */
598 ife_matrix = pbqp_matrix_alloc(pbqp_alloc_env.pbqp_inst, colors_n, colors_n);
600 for (row = 0, col = 0; row < colors_n; row++, col++)
601 pbqp_matrix_set(ife_matrix, row, col, INF_COSTS);
603 pbqp_alloc_env.ife_matrix_template = ife_matrix;
606 if (!use_exec_freq) {
607 /* create costs matrix template for affinity edges */
608 pbqp_matrix_t *afe_matrix = pbqp_matrix_alloc(pbqp_alloc_env.pbqp_inst, colors_n, colors_n);
610 for (row = 0; row < colors_n; row++) {
611 for (col = 0; col < colors_n; col++) {
613 pbqp_matrix_set(afe_matrix, row, col, 2);
616 pbqp_alloc_env.aff_matrix_template = afe_matrix;
620 /* create pbqp instance */
622 ir_timer_reset_and_start(t_ra_pbqp_alloc_create);
625 dom_tree_walk_irg(irg, create_pbqp_coloring_instance , NULL, &pbqp_alloc_env);
627 ir_timer_stop(t_ra_pbqp_alloc_create);
631 /* set up affinity edges */
633 ir_timer_reset_and_start(t_ra_pbqp_alloc_create_aff);
635 foreach_plist(pbqp_alloc_env.rpeo, element) {
636 pbqp_node_t *node = (pbqp_node_t*)element->data;
637 ir_node *irn = get_idx_irn(irg, node->index);
639 create_affinity_edges(irn, &pbqp_alloc_env);
642 ir_timer_stop(t_ra_pbqp_alloc_create_aff);
647 // dump graph before solving pbqp
648 file_before = my_open(env, "", "-pbqp_coloring.html");
649 set_dumpfile(pbqp_alloc_env.pbqp_inst, file_before);
652 /* print out reverse perfect elimination order */
655 plist_element_t *elements;
656 foreach_plist(pbqp_alloc_env.rpeo, elements) {
657 pbqp_node_t *node = elements->data;
658 printf(" %d(%ld);", node->index, get_idx_irn(irg, node->index)->node_nr);
664 /* solve pbqp instance */
666 ir_timer_reset_and_start(t_ra_pbqp_alloc_solve);
668 if(use_late_decision) {
669 solve_pbqp_heuristical_co_ld(pbqp_alloc_env.pbqp_inst,pbqp_alloc_env.rpeo);
672 solve_pbqp_heuristical_co(pbqp_alloc_env.pbqp_inst,pbqp_alloc_env.rpeo);
675 ir_timer_stop(t_ra_pbqp_alloc_solve);
679 solution = get_solution(pbqp_alloc_env.pbqp_inst);
680 if (solution == INF_COSTS)
681 panic("No PBQP solution found");
685 foreach_plist(pbqp_alloc_env.rpeo, element) {
686 pbqp_node_t *node = (pbqp_node_t*)element->data;
687 ir_node *irn = get_idx_irn(irg, node->index);
688 num color = get_node_solution(pbqp_alloc_env.pbqp_inst, node->index);
689 const arch_register_t *reg = arch_register_for_index(cls, color);
691 arch_set_irn_register(irn, reg);
696 printf("PBQP alloc create: %10.3lf msec\n",
697 (double)ir_timer_elapsed_usec(t_ra_pbqp_alloc_create) / 1000.0);
698 printf("PBQP alloc solve: %10.3lf msec\n",
699 (double)ir_timer_elapsed_usec(t_ra_pbqp_alloc_solve) / 1000.0);
700 printf("PBQP alloc create aff: %10.3lf msec\n",
701 (double)ir_timer_elapsed_usec(t_ra_pbqp_alloc_create_aff) / 1000.0);
705 /* free reserved memory */
709 free_pbqp(pbqp_alloc_env.pbqp_inst);
710 plist_free(pbqp_alloc_env.rpeo);
711 xfree(pbqp_alloc_env.restr_nodes);
712 xfree(pbqp_alloc_env.ife_edge_num);
717 * Initializes this module.
719 BE_REGISTER_MODULE_CONSTRUCTOR(be_init_pbqp_coloring)
720 void be_init_pbqp_coloring(void)
722 lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
723 lc_opt_entry_t *ra_grp = lc_opt_get_grp(be_grp, "ra");
724 lc_opt_entry_t *chordal_grp = lc_opt_get_grp(ra_grp, "chordal");
725 lc_opt_entry_t *coloring_grp = lc_opt_get_grp(chordal_grp, "coloring");
726 lc_opt_entry_t *pbqp_grp = lc_opt_get_grp(coloring_grp, "pbqp");
728 static be_ra_chordal_coloring_t coloring = {
732 lc_opt_add_table(pbqp_grp, options);
733 be_register_chordal_coloring("pbqp", &coloring);