Implement binary emitter for fpush.
[libfirm] / ir / opt / ldst2.c
index b4fada2..d73a8f7 100644 (file)
@@ -41,6 +41,7 @@
 #include "irdump.h"
 #include "irflag_t.h"
 #include "irprintf.h"
+#include "irpass.h"
 
 #if +0
 #define OPTIMISE_LOAD_AFTER_LOAD
@@ -805,11 +806,11 @@ static void walker(ir_node *proj, void *env)
                        in[i++] = p;
                }
                assert(i == n);
-               sync = new_r_Sync(irg, block, n, in);
+               sync = new_r_Sync(block, n, in);
                exchange(proj, sync);
 
                assert(pn_Load_M == pn_Store_M);
-               proj = new_r_Proj(irg, block, mem_op, mode_M, pn_Load_M);
+               proj = new_r_Proj(block, mem_op, mode_M, pn_Load_M);
                set_Sync_pred(sync, 0, proj);
 
                n = ir_nodeset_size(&pi.this_mem);
@@ -826,7 +827,7 @@ static void walker(ir_node *proj, void *env)
                                in[i++] = p;
                        }
                        assert(i == n);
-                       sync = new_r_Sync(irg, block, n, in);
+                       sync = new_r_Sync(block, n, in);
                }
                set_memop_mem(mem_op, sync);
        }
@@ -845,3 +846,8 @@ void opt_sync(ir_graph *irg)
        //optimize_graph_df(irg);
        //irg_walk_graph(irg, NormaliseSync, NULL, NULL);
 }
+
+ir_graph_pass_t *opt_sync_pass(const char *name)
+{
+       return def_graph_pass(name ? name : "opt_sync", opt_sync);
+}