changed ir_printf call into DBG output
[libfirm] / ir / be / bechordal_main.c
1 /**
2  * @file   bechordal_main.c
3  * @date   29.11.2005
4  * @author Sebastian Hack
5  *
6  * Copyright (C) 2005 Universitaet Karlsruhe
7  * Released under the GPL
8  *
9  * Driver for the chordal register allocator.
10  */
11 #ifdef HAVE_CONFIG_H
12 #include "config.h"
13 #endif
14
15 #include "obst.h"
16 #include "pset.h"
17 #include "list.h"
18 #include "bitset.h"
19 #include "iterator.h"
20 #include "firm_config.h"
21
22 #ifdef WITH_LIBCORE
23 #include <libcore/lc_opts.h>
24 #include <libcore/lc_opts_enum.h>
25 #include <libcore/lc_timing.h>
26 #endif /* WITH_LIBCORE */
27
28 #include "irmode_t.h"
29 #include "irgraph_t.h"
30 #include "irprintf_t.h"
31 #include "irgwalk.h"
32 #include "irdump.h"
33 #include "irdom.h"
34 #include "irbitset.h"
35 #include "debug.h"
36 #include "xmalloc.h"
37
38 #include "bechordal_t.h"
39 #include "beabi.h"
40 #include "beutil.h"
41 #include "besched.h"
42 #include "benumb_t.h"
43 #include "besched_t.h"
44 #include "belive_t.h"
45 #include "bearch.h"
46 #include "beifg_t.h"
47 #include "beifg_impl.h"
48
49 #include "bespillbelady.h"
50 #include "bespillmorgan.h"
51 #include "belower.h"
52
53 #ifdef WITH_ILP
54 #include "bespillilp.h"
55 #include "bespillremat.h"
56 #include "bespillappel.h"
57 #endif /* WITH_ILP */
58
59 #include "becopystat.h"
60 #include "becopyopt.h"
61 #include "bessadestr.h"
62 #include "beverify.h"
63
64
65 void be_ra_chordal_check(be_chordal_env_t *chordal_env) {
66         const arch_env_t *arch_env = chordal_env->birg->main_env->arch_env;
67         struct obstack ob;
68         pmap_entry *pme;
69         ir_node **nodes, *n1, *n2;
70         int i, o;
71         DEBUG_ONLY(firm_dbg_module_t *dbg = chordal_env->dbg;)
72
73         /* Collect all irns */
74         obstack_init(&ob);
75         pmap_foreach(chordal_env->border_heads, pme) {
76                 border_t *curr;
77                 struct list_head *head = pme->value;
78                 list_for_each_entry(border_t, curr, head, list)
79                         if (curr->is_def && curr->is_real)
80                                 if (arch_get_irn_reg_class(arch_env, curr->irn, -1) == chordal_env->cls)
81                                         obstack_ptr_grow(&ob, curr->irn);
82         }
83         obstack_ptr_grow(&ob, NULL);
84         nodes = (ir_node **) obstack_finish(&ob);
85
86         /* Check them */
87         for (i = 0, n1 = nodes[i]; n1; n1 = nodes[++i]) {
88                 const arch_register_t *n1_reg, *n2_reg;
89
90                 n1_reg = arch_get_irn_register(arch_env, n1);
91                 if (!arch_reg_is_allocatable(arch_env, n1, -1, n1_reg)) {
92                         DBG((dbg, 0, "Register %s assigned to %+F is not allowed\n", n1_reg->name, n1));
93                         assert(0 && "Register constraint does not hold");
94                 }
95                 for (o = i+1, n2 = nodes[o]; n2; n2 = nodes[++o]) {
96                         n2_reg = arch_get_irn_register(arch_env, n2);
97                         if (values_interfere(n1, n2) && n1_reg == n2_reg) {
98                                 DBG((dbg, 0, "Values %+F and %+F interfere and have the same register assigned: %s\n", n1, n2, n1_reg->name));
99                                 assert(0 && "Interfering values have the same color!");
100                         }
101                 }
102         }
103         obstack_free(&ob, NULL);
104 }
105
106 int nodes_interfere(const be_chordal_env_t *env, const ir_node *a, const ir_node *b)
107 {
108         if(env->ifg)
109                 return be_ifg_connected(env->ifg, a, b);
110         else
111                 return values_interfere(a, b);
112 }
113
114
115 static be_ra_chordal_opts_t options = {
116         BE_CH_DUMP_NONE,
117         BE_CH_SPILL_BELADY,
118         BE_CH_COPYMIN_HEUR2,
119         BE_CH_IFG_STD,
120         BE_CH_LOWER_PERM_SWAP,
121         BE_CH_VRFY_WARN,
122 };
123
124 static be_ra_timer_t ra_timer = {
125         NULL,
126         NULL,
127         NULL,
128         NULL,
129         NULL,
130         NULL,
131         NULL,
132         NULL,
133         NULL,
134         NULL,
135 };
136
137 #ifdef WITH_LIBCORE
138 static const lc_opt_enum_int_items_t spill_items[] = {
139         { "morgan", BE_CH_SPILL_MORGAN },
140         { "belady", BE_CH_SPILL_BELADY },
141 #ifdef WITH_ILP
142         { "ilp",    BE_CH_SPILL_ILP    },
143         { "remat",  BE_CH_SPILL_REMAT  },
144         { "appel",  BE_CH_SPILL_APPEL  },
145 #endif /* WITH_ILP */
146         { NULL, 0 }
147 };
148
149 static const lc_opt_enum_int_items_t copymin_items[] = {
150         { "none",  BE_CH_COPYMIN_NONE      },
151         { "heur1", BE_CH_COPYMIN_HEUR1     },
152         { "heur2", BE_CH_COPYMIN_HEUR2     },
153         { "stat",  BE_CH_COPYMIN_STAT      },
154         { "park",  BE_CH_COPYMIN_PARK_MOON },
155 #ifdef WITH_ILP
156         { "ilp1",  BE_CH_COPYMIN_ILP1 },
157         { "ilp2",  BE_CH_COPYMIN_ILP2 },
158 #endif /* WITH_ILP */
159         { NULL, 0 }
160 };
161
162 static const lc_opt_enum_int_items_t ifg_flavor_items[] = {
163         { "std",     BE_CH_IFG_STD     },
164         { "fast",    BE_CH_IFG_FAST    },
165         { "clique",  BE_CH_IFG_CLIQUE  },
166         { "pointer", BE_CH_IFG_POINTER },
167         { "list",    BE_CH_IFG_LIST    },
168         { "check",   BE_CH_IFG_CHECK   },
169         { NULL,      0                 }
170 };
171
172 static const lc_opt_enum_int_items_t lower_perm_items[] = {
173         { "copy", BE_CH_LOWER_PERM_COPY },
174         { "swap", BE_CH_LOWER_PERM_SWAP },
175         { NULL, 0 }
176 };
177
178 static const lc_opt_enum_int_items_t lower_perm_stat_items[] = {
179         { NULL, 0 }
180 };
181
182 static const lc_opt_enum_int_items_t dump_items[] = {
183         { "spill",    BE_CH_DUMP_SPILL     },
184         { "live",     BE_CH_DUMP_LIVE      },
185         { "color",    BE_CH_DUMP_COLOR     },
186         { "copymin",  BE_CH_DUMP_COPYMIN   },
187         { "ssadestr", BE_CH_DUMP_SSADESTR  },
188         { "tree",     BE_CH_DUMP_TREE_INTV },
189         { "constr",   BE_CH_DUMP_CONSTR    },
190         { "lower",    BE_CH_DUMP_LOWER     },
191         { "all",      BE_CH_DUMP_ALL       },
192         { NULL, 0 }
193 };
194
195 static const lc_opt_enum_int_items_t be_ch_vrfy_items[] = {
196         { "off",    BE_CH_VRFY_OFF    },
197         { "warn",   BE_CH_VRFY_WARN   },
198         { "assert", BE_CH_VRFY_ASSERT },
199         { NULL, 0 }
200 };
201
202 static lc_opt_enum_int_var_t spill_var = {
203         &options.spill_method, spill_items
204 };
205
206 static lc_opt_enum_int_var_t copymin_var = {
207         &options.copymin_method, copymin_items
208 };
209
210 static lc_opt_enum_int_var_t ifg_flavor_var = {
211         &options.ifg_flavor, ifg_flavor_items
212 };
213
214 static lc_opt_enum_int_var_t lower_perm_var = {
215         &options.lower_perm_opt, lower_perm_items
216 };
217
218 static lc_opt_enum_int_var_t dump_var = {
219         &options.dump_flags, dump_items
220 };
221
222 static lc_opt_enum_int_var_t be_ch_vrfy_var = {
223         &options.vrfy_option, be_ch_vrfy_items
224 };
225
226 static const lc_opt_table_entry_t be_chordal_options[] = {
227         LC_OPT_ENT_ENUM_PTR ("spill",   "spill method (belady, ilp, remat or appel)", &spill_var),
228         LC_OPT_ENT_ENUM_PTR ("copymin", "copymin method (none, heur1, heur2, ilp1, ilp2 or stat)", &copymin_var),
229         LC_OPT_ENT_ENUM_PTR ("ifg",     "interference graph flavour (std, fast, clique, pointer, list, check)", &ifg_flavor_var),
230         LC_OPT_ENT_ENUM_PTR ("perm",    "perm lowering options (copy or swap)", &lower_perm_var),
231         LC_OPT_ENT_ENUM_MASK("dump",    "select dump phases", &dump_var),
232         LC_OPT_ENT_ENUM_PTR ("vrfy",    "verify options (off, warn, assert)", &be_ch_vrfy_var),
233         { NULL }
234 };
235
236 static void be_ra_chordal_register_options(lc_opt_entry_t *grp)
237 {
238         static int run_once = 0;
239         lc_opt_entry_t *chordal_grp;
240
241         if (! run_once) {
242                 run_once    = 1;
243                 chordal_grp = lc_opt_get_grp(grp, "chordal");
244
245                 lc_opt_add_table(chordal_grp, be_chordal_options);
246         }
247
248         co_register_options(chordal_grp);
249 }
250 #endif /* WITH_LIBCORE */
251
252 static void dump(unsigned mask, ir_graph *irg,
253                                  const arch_register_class_t *cls,
254                                  const char *suffix,
255                                  void (*dump_func)(ir_graph *, const char *))
256 {
257         if((options.dump_flags & mask) == mask) {
258                 if (cls) {
259                         char buf[256];
260                         snprintf(buf, sizeof(buf), "-%s%s", cls->name, suffix);
261                         be_dump(irg, buf, dump_func);
262                 }
263                 else
264                         be_dump(irg, suffix, dump_func);
265         }
266 }
267
268 static void put_ignore_colors(be_chordal_env_t *chordal_env)
269 {
270         int n_colors = chordal_env->cls->n_regs;
271         int i;
272
273         bitset_clear_all(chordal_env->ignore_colors);
274         be_abi_put_ignore_regs(chordal_env->birg->abi, chordal_env->cls, chordal_env->ignore_colors);
275         for(i = 0; i < n_colors; ++i)
276                 if(arch_register_type_is(&chordal_env->cls->regs[i], ignore))
277                         bitset_set(chordal_env->ignore_colors, i);
278 }
279
280 FILE *be_chordal_open(const be_chordal_env_t *env, const char *prefix, const char *suffix)
281 {
282         char buf[1024];
283
284         ir_snprintf(buf, sizeof(buf), "%s%F_%s.%s", prefix, env->irg, env->cls->name, suffix);
285         return fopen(buf, "wt");
286 }
287
288 void check_ifg_implementations(be_chordal_env_t *chordal_env)
289 {
290         FILE *f;
291
292         f = be_chordal_open(chordal_env, "std", "log");
293         chordal_env->ifg = be_ifg_std_new(chordal_env);
294         be_ifg_check_sorted_to_file(chordal_env->ifg, f);
295         fclose(f);
296
297         f = be_chordal_open(chordal_env, "list", "log");
298         be_ifg_free(chordal_env->ifg);
299         chordal_env->ifg = be_ifg_list_new(chordal_env);
300         be_ifg_check_sorted_to_file(chordal_env->ifg, f);
301         fclose(f);
302
303         f = be_chordal_open(chordal_env, "clique", "log");
304         be_ifg_free(chordal_env->ifg);
305         chordal_env->ifg = be_ifg_clique_new(chordal_env);
306         be_ifg_check_sorted_to_file(chordal_env->ifg, f);
307         fclose(f);
308
309         f = be_chordal_open(chordal_env, "pointer", "log");
310         be_ifg_free(chordal_env->ifg);
311         chordal_env->ifg = be_ifg_pointer_new(chordal_env);
312         be_ifg_check_sorted_to_file(chordal_env->ifg, f);
313         fclose(f);
314
315         chordal_env->ifg = NULL;
316 };
317
318 static be_ra_timer_t *be_ra_chordal_main(const be_irg_t *bi)
319 {
320         const be_main_env_t *main_env  = bi->main_env;
321         const arch_isa_t    *isa       = arch_env_get_isa(main_env->arch_env);
322         ir_graph            *irg       = bi->irg;
323         be_options_t        *main_opts = main_env->options;
324         copy_opt_t          *co;
325
326         int j, m;
327         be_chordal_env_t chordal_env;
328
329         if (main_opts->timing == BE_TIME_ON) {
330                 ra_timer.t_prolog  = lc_timer_register("prolog",   "regalloc prolog");
331                 ra_timer.t_epilog  = lc_timer_register("epilog",   "regalloc epilog");
332                 ra_timer.t_live    = lc_timer_register("liveness", "be liveness");
333                 ra_timer.t_spill   = lc_timer_register("spill",    "spiller");
334                 ra_timer.t_color   = lc_timer_register("color",    "graph coloring");
335                 ra_timer.t_ifg     = lc_timer_register("ifg",      "interference graph");
336                 ra_timer.t_copymin = lc_timer_register("copymin",  "copy minimization");
337                 ra_timer.t_ssa     = lc_timer_register("ssadestr", "ssa destruction");
338                 ra_timer.t_verify  = lc_timer_register("verify",   "graph verification");
339                 ra_timer.t_other   = lc_timer_register("other",    "other time");
340
341                 LC_STOP_AND_RESET_TIMER(ra_timer.t_prolog);
342                 LC_STOP_AND_RESET_TIMER(ra_timer.t_epilog);
343                 LC_STOP_AND_RESET_TIMER(ra_timer.t_live);
344                 LC_STOP_AND_RESET_TIMER(ra_timer.t_spill);
345                 LC_STOP_AND_RESET_TIMER(ra_timer.t_color);
346                 LC_STOP_AND_RESET_TIMER(ra_timer.t_ifg);
347                 LC_STOP_AND_RESET_TIMER(ra_timer.t_copymin);
348                 LC_STOP_AND_RESET_TIMER(ra_timer.t_ssa);
349                 LC_STOP_AND_RESET_TIMER(ra_timer.t_verify);
350                 LC_STOP_AND_RESET_TIMER(ra_timer.t_other);
351         }
352
353 #define BE_TIMER_PUSH(timer)  if (main_opts->timing == BE_TIME_ON) lc_timer_push(timer)
354 #define BE_TIMER_POP()        if (main_opts->timing == BE_TIME_ON) lc_timer_pop()
355
356         BE_TIMER_PUSH(ra_timer.t_other);
357         BE_TIMER_PUSH(ra_timer.t_prolog);
358
359         compute_doms(irg);
360
361         chordal_env.opts          = &options;
362         chordal_env.irg           = irg;
363         chordal_env.birg          = bi;
364         chordal_env.dom_front     = be_compute_dominance_frontiers(irg);
365         FIRM_DBG_REGISTER(chordal_env.dbg, "firm.be.chordal");
366
367         obstack_init(&chordal_env.obst);
368
369         BE_TIMER_POP();
370
371         /* Perform the following for each register class. */
372         for(j = 0, m = arch_isa_get_n_reg_class(isa); j < m; ++j) {
373                 FILE *f;
374                 chordal_env.cls           = arch_isa_get_reg_class(isa, j);
375                 chordal_env.border_heads  = pmap_create();
376                 chordal_env.ignore_colors = bitset_malloc(chordal_env.cls->n_regs);
377
378                 BE_TIMER_PUSH(ra_timer.t_live);
379
380                 /* put all ignore registers into the ignore register set. */
381                 put_ignore_colors(&chordal_env);
382
383                 be_liveness(irg);
384
385                 BE_TIMER_POP();
386
387                 dump(BE_CH_DUMP_LIVE, irg, chordal_env.cls, "-live", dump_ir_block_graph_sched);
388
389                 BE_TIMER_PUSH(ra_timer.t_spill);
390
391                 /* spilling */
392                 switch(options.spill_method) {
393                 case BE_CH_SPILL_MORGAN:
394                         be_spill_morgan(&chordal_env);
395                         break;
396                 case BE_CH_SPILL_BELADY:
397                         be_spill_belady(&chordal_env);
398                         break;
399 #ifdef WITH_ILP
400                 case BE_CH_SPILL_ILP:
401                         be_spill_ilp(&chordal_env);
402                         break;
403                 case BE_CH_SPILL_REMAT:
404                         be_spill_remat(&chordal_env);
405                         break;
406                 case BE_CH_SPILL_APPEL:
407                         be_spill_appel(&chordal_env);
408                         break;
409 #endif /* WITH_ILP */
410                 default:
411                         fprintf(stderr, "no valid spiller selected. falling back to belady\n");
412                         be_spill_belady(&chordal_env);
413                 }
414
415                 BE_TIMER_POP();
416
417                 dump(BE_CH_DUMP_SPILL, irg, chordal_env.cls, "-spill", dump_ir_block_graph_sched);
418                 be_abi_fix_stack_nodes(bi->abi);
419
420                 BE_TIMER_PUSH(ra_timer.t_verify);
421
422                 /* verify schedule and register pressure */
423                 if (options.vrfy_option == BE_CH_VRFY_WARN) {
424                         be_verify_schedule(irg);
425                         be_verify_register_pressure(chordal_env.birg->main_env->arch_env, chordal_env.cls, irg);
426                 }
427                 else if (options.vrfy_option == BE_CH_VRFY_ASSERT) {
428                         assert(be_verify_schedule(irg) && "Schedule verification failed");
429                         assert(be_verify_register_pressure(chordal_env.birg->main_env->arch_env, chordal_env.cls, irg)
430                                 && "Register pressure verification failed");
431                 }
432
433                 BE_TIMER_POP();
434                 BE_TIMER_PUSH(ra_timer.t_live);
435                 be_liveness(irg);
436                 BE_TIMER_POP();
437                 BE_TIMER_PUSH(ra_timer.t_color);
438
439                 /* Color the graph. */
440                 be_ra_chordal_color(&chordal_env);
441
442                 BE_TIMER_POP();
443
444                 dump(BE_CH_DUMP_CONSTR, irg, chordal_env.cls, "-color", dump_ir_block_graph_sched);
445
446                 BE_TIMER_PUSH(ra_timer.t_ifg);
447                 //be_ifg_check_performance(&chordal_env);
448
449                 /* Create the ifg with the selected flavor */
450                 switch (options.ifg_flavor) {
451                         default:
452                                 fprintf(stderr, "no valid ifg flavour selected. falling back to std\n");
453                         case BE_CH_IFG_STD:
454                         case BE_CH_IFG_FAST:
455                                 chordal_env.ifg = be_ifg_std_new(&chordal_env);
456                                 break;
457                         case BE_CH_IFG_CLIQUE:
458                                 chordal_env.ifg = be_ifg_clique_new(&chordal_env);
459                                 break;
460                         case BE_CH_IFG_POINTER:
461                                 chordal_env.ifg = be_ifg_pointer_new(&chordal_env);
462                                 break;
463                         case BE_CH_IFG_LIST:
464                                 chordal_env.ifg = be_ifg_list_new(&chordal_env);
465                                 break;
466                         case BE_CH_IFG_CHECK:
467                                 check_ifg_implementations(&chordal_env);
468                                 /* Build the interference graph. */
469                                 chordal_env.ifg = be_ifg_std_new(&chordal_env);
470                                 //be_ifg_check(chordal_env.ifg);
471                                 //be_ifg_check_sorted(chordal_env.ifg);
472                                 break;
473                 }
474
475
476 #if 0
477                 {
478                         be_ifg_t *std = be_ifg_std_new(&chordal_env);
479                         f = be_chordal_open(&chordal_env, "std", "csv");
480                         be_ifg_check_sorted_to_file(std, f);
481                         be_ifg_free(std);
482                         fclose(f);
483                 }
484
485                 f = be_chordal_open(&chordal_env, "clique", "csv");
486                 be_ifg_check_sorted_to_file(chordal_env.ifg, f);
487                 fclose(f);
488 #endif
489                 BE_TIMER_POP();
490
491                 BE_TIMER_PUSH(ra_timer.t_verify);
492
493                 if (options.vrfy_option != BE_CH_VRFY_OFF)
494                         be_ra_chordal_check(&chordal_env);
495
496 //              be_ifg_check_sorted(chordal_env.ifg);
497                 BE_TIMER_POP();
498                 BE_TIMER_PUSH(ra_timer.t_copymin);
499
500                 /* copy minimization */
501                 co = NULL;
502                 if (options.copymin_method != BE_CH_COPYMIN_NONE && options.copymin_method != BE_CH_COPYMIN_STAT) {
503                         co = new_copy_opt(&chordal_env, co_get_costs_loop_depth);
504                         co_build_ou_structure(co);
505                         co_build_graph_structure(co);
506                 }
507
508                 switch(options.copymin_method) {
509                         case BE_CH_COPYMIN_HEUR1:
510                                 co_solve_heuristic(co);
511                                 break;
512                         case BE_CH_COPYMIN_HEUR2:
513                                 co_solve_heuristic_new(co);
514                                 break;
515                         case BE_CH_COPYMIN_PARK_MOON:
516                                 co_solve_park_moon(co);
517                                 break;
518                         case BE_CH_COPYMIN_STAT:
519                                 co_compare_solvers(&chordal_env);
520                                 break;
521 #ifdef WITH_ILP
522                         case BE_CH_COPYMIN_ILP1:
523                                 printf("FIXME: %s:%d ILP1 not yet implemented!\n", __FILE__, __LINE__);
524                                 co_solve_ilp1(co, 60.0);
525                                 break;
526                         case BE_CH_COPYMIN_ILP2:
527                                 co_solve_ilp2(co, 60.0);
528                                 break;
529 #endif /* WITH_ILP */
530                         case BE_CH_COPYMIN_NONE:
531                         default:
532                                 break;
533                 }
534
535                 if (co) {
536                         co_free_graph_structure(co);
537                         co_free_ou_structure(co);
538                         free_copy_opt(co);
539                 }
540
541                 BE_TIMER_POP();
542
543                 dump(BE_CH_DUMP_COPYMIN, irg, chordal_env.cls, "-copymin", dump_ir_block_graph_sched);
544
545                 BE_TIMER_PUSH(ra_timer.t_verify);
546
547                 if (options.vrfy_option != BE_CH_VRFY_OFF)
548                         be_ra_chordal_check(&chordal_env);
549
550                 BE_TIMER_POP();
551                 BE_TIMER_PUSH(ra_timer.t_ssa);
552
553                 /* ssa destruction */
554                 be_ssa_destruction(&chordal_env);
555
556                 BE_TIMER_POP();
557
558                 dump(BE_CH_DUMP_SSADESTR, irg, chordal_env.cls, "-ssadestr", dump_ir_block_graph_sched);
559
560                 BE_TIMER_PUSH(ra_timer.t_verify);
561                 if (options.vrfy_option != BE_CH_VRFY_OFF) {
562                         be_ssa_destruction_check(&chordal_env);
563                         be_ra_chordal_check(&chordal_env);
564                 }
565                 BE_TIMER_POP();
566
567                 if (options.copymin_method == BE_CH_COPYMIN_STAT)
568                         copystat_dump(irg);
569
570                 be_ifg_free(chordal_env.ifg);
571                 pmap_destroy(chordal_env.border_heads);
572                 bitset_free(chordal_env.ignore_colors);
573         }
574
575         BE_TIMER_PUSH(ra_timer.t_epilog);
576
577         be_compute_spill_offsets(&chordal_env);
578
579         dump(BE_CH_DUMP_LOWER, irg, NULL, "-spilloff", dump_ir_block_graph_sched);
580
581         lower_nodes_after_ra(&chordal_env, options.lower_perm_opt & BE_CH_LOWER_PERM_COPY ? 1 : 0);
582         dump(BE_CH_DUMP_LOWER, irg, NULL, "-belower-after-ra", dump_ir_block_graph_sched);
583
584         obstack_free(&chordal_env.obst, NULL);
585         be_free_dominance_frontiers(chordal_env.dom_front);
586
587         BE_TIMER_POP();
588         BE_TIMER_POP();
589
590 #undef BE_TIMER_PUSH
591 #undef BE_TIMER_POP
592
593         return main_opts->timing == BE_TIME_ON ? &ra_timer : NULL;
594 }
595
596 const be_ra_t be_ra_chordal_allocator = {
597 #ifdef WITH_LIBCORE
598         be_ra_chordal_register_options,
599 #endif
600         be_ra_chordal_main
601 };