Fixed initialization of option tables
[libfirm] / ir / opt / ifconv.c
index 7c87fc3..fd97a4d 100644 (file)
 
 #include <assert.h>
 
+#include "iroptimize.h"
 #include "obst.h"
 #include "irnode_t.h"
 #include "cdep.h"
 #include "ircons.h"
-#include "ifconv.h"
 #include "irdom.h"
 #include "irgmod.h"
 #include "irgopt.h"
 #include "irgwalk.h"
 #include "irtools.h"
-#include "return.h"
 #include "array.h"
 #include "xmalloc.h"
 
@@ -341,7 +340,6 @@ restart:
                                                DB((dbg, LEVEL_2, "Generating %+F for %+F\n", psi, phi));
                                        }
 
-                                       /* only exchange if we have a Psi */
                                        if (arity == 2) {
                                                exchange(phi, psi);
                                        } else {
@@ -637,10 +635,7 @@ void opt_if_conv(ir_graph *irg, const opt_if_conv_info_t *params)
                return;
 
        /* get the parameters */
-       if (params)
-               memcpy(&p, params, sizeof(p));
-       else
-               memcpy(&p, &default_info, sizeof(p));
+       p = (params != NULL ? *params : default_info);
 
        FIRM_DBG_REGISTER(dbg, "firm.opt.ifconv");