-static void *TEMPLATE_cg_init(be_irg_t *birg);
-
-static const arch_code_generator_if_t TEMPLATE_code_gen_if = {
- TEMPLATE_cg_init,
- NULL, /* get_pic_base hook */
- NULL, /* before abi introduce hook */
- TEMPLATE_prepare_graph,
- NULL, /* spill hook */
- TEMPLATE_before_ra, /* before register allocation hook */
- TEMPLATE_after_ra, /* after register allocation hook */
- TEMPLATE_finish_irg,
- TEMPLATE_emit_and_done
-};
-
-/**
- * Initializes the code generator.
- */
-static void *TEMPLATE_cg_init(be_irg_t *birg)
-{
- const arch_env_t *arch_env = be_get_birg_arch_env(birg);
- TEMPLATE_isa_t *isa = (TEMPLATE_isa_t *) arch_env;
- TEMPLATE_code_gen_t *cg = XMALLOC(TEMPLATE_code_gen_t);
-
- cg->impl = &TEMPLATE_code_gen_if;
- cg->irg = be_get_birg_irg(birg);
- cg->isa = isa;
- cg->birg = birg;
-
- return (arch_code_generator_t *)cg;
-}