workaround for void* conversion of funcptr
[libfirm] / ir / be / beraextern.c
index cf59668..3646a86 100644 (file)
@@ -7,8 +7,8 @@
  * Implementation of the RA-Interface for an external, (non-SSA) register allocator.
  *
  * The external register allocator is a program taking 2 arguments:
- *   1) An input file in which the cfg is defined
- *   2) An output file containing the essential actions performed during allocation
+ *   1) An input file in which the interference graph is defined
+ *   2) An output file containing the instructions to perform
  *
 
 
@@ -200,9 +200,7 @@ static void handle_constraints_walker(ir_node *irn, void *env) {
                        set_irn_n(irn, pos, cpy);
 
                        /* set an out constraint for the copy */
-                       /* TODO: Insert right code here. *
-                       be_set_constr_single_reg(cpy, -1, &reg);
-                       */
+                       be_set_constr_limited(cpy, -1, &req);
                }
        }
 }
@@ -831,7 +829,10 @@ static char callee[128] = "echo";
  * Read in results and apply them
  *
  */
-static void be_ra_extern_main(const be_main_env_t *env, ir_graph *irg) {
+static void be_ra_extern_main(const be_irg_t *bi) {
+       be_main_env_t *env = bi->main_env;
+       ir_graph *irg = bi->irg;
+
        be_raext_env_t raenv;
        int clsnr, clss;
        var_info_t *vi;
@@ -899,9 +900,10 @@ static void be_ra_extern_main(const be_main_env_t *env, ir_graph *irg) {
 
 #ifdef WITH_LIBCORE
 
+
 static const lc_opt_enum_const_ptr_items_t ssa_destr_items[] = {
-       { "simple",    ssa_destr_simple },
-       { "rastello",  ssa_destr_rastello },
+       { "simple",    (void*)ssa_destr_simple }, /* TODO make (void*) casts nicer */
+       { "rastello",  (void*)ssa_destr_rastello },
        { NULL,      NULL }
 };