fix mips immediate dumper
[libfirm] / ir / ana / execfreq.c
index d2b9d85..6edc7af 100644 (file)
@@ -45,6 +45,7 @@
 #include "firm_common_t.h"
 #include "set.h"
 #include "hashptr.h"
+#include "debug.h"
 
 #include "irprog_t.h"
 #include "irgraph_t.h"
@@ -86,6 +87,7 @@ cmp_freq(const void *a, const void *b, size_t size)
 {
        const freq_t *p = a;
        const freq_t *q = b;
+       (void) size;
 
        return !(p->irn == q->irn);
 }
@@ -224,6 +226,7 @@ ir_exec_freq *create_execfreq(ir_graph *irg)
        execfreq->hook.context = execfreq;
        execfreq->hook.hook._hook_node_info = exec_freq_node_info;
        register_hook(hook_node_info, &execfreq->hook);
+       (void) irg;
 
        return execfreq;
 }
@@ -257,7 +260,11 @@ compute_execfreq(ir_graph * irg, double loop_weight)
        freqs = ef->set = new_set(cmp_freq, 32);
 
        construct_cf_backedges(irg);
-       edges_assure(irg);
+       /* TODO: edges are corrupt for EDGE_KIND_BLOCK after the local optimize
+                graph phase merges blocks in the x86 backend */
+       edges_deactivate(irg);
+       edges_activate(irg);
+       /* edges_assure(irg); */
 
        wd.idx = 0;
        wd.set = freqs;
@@ -292,6 +299,7 @@ compute_execfreq(ir_graph * irg, double loop_weight)
 
        x = solve_lgs(matrix, rhs, size);
        if (x == NULL) {
+               DEBUG_ONLY(ir_fprintf(stderr, "Debug Warning: Couldn't estimate execution frequencies for %+F\n", irg));
                ef->infeasible = 1;
        } else {
                ef->max = 0.0;