X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Fexecution_frequency.c;h=8765c71649d7960fe8482e56518a17b7ea0fb92e;hb=3da5ed2598245b896255bc444aaa1768f6098cfe;hp=b69bd48f522a29dc25694b03515193b9be04e89c;hpb=abbf9492df1993d211412ba520feb81de0688c2a;p=libfirm diff --git a/ir/ana/execution_frequency.c b/ir/ana/execution_frequency.c index b69bd48f5..8765c7164 100644 --- a/ir/ana/execution_frequency.c +++ b/ir/ana/execution_frequency.c @@ -31,6 +31,7 @@ #include "set.h" #include "pdeq.h" #include "hashptr.h" +#include "error.h" #include "irprog_t.h" #include "irgraph_t.h" @@ -130,7 +131,7 @@ static int just_passed_a_Raise = 0; static ir_node *Cond_list = NULL; /* We do not use an extra set, as Projs are not yet in the existing one. */ -void set_ProjX_probability(ir_node *n, Cond_prob prob) +static void set_ProjX_probability(ir_node *n, Cond_prob prob) { reg_exec_freq ef; ef.reg = n; @@ -138,7 +139,7 @@ void set_ProjX_probability(ir_node *n, Cond_prob prob) set_insert(exec_freq_set, &ef, sizeof(ef), exec_freq_hash(&ef)); } -Cond_prob get_ProjX_probability(ir_node *n) +static Cond_prob get_ProjX_probability(ir_node *n) { reg_exec_freq ef, *found; ef.reg = n; @@ -245,7 +246,7 @@ static void walk_post(ir_node *n, void *env) /** Precompute which Conds test for an exception. * * Operates on current_ir_graph. */ -void precompute_cond_evaluation(void) +static void precompute_cond_evaluation(void) { ir_node *c; @@ -265,10 +266,12 @@ void precompute_cond_evaluation(void) /* both are exceptions */ if ((get_ProjX_probability(p0) == Cond_prob_exception_taken) && (get_ProjX_probability(p1) == Cond_prob_exception_taken) ) { - assert(0 && "I tried to avoid these!"); + panic("I tried to avoid these!"); +#if 0 /* It's a */ set_ProjX_probability(p0, Cond_prob_normal); set_ProjX_probability(p1, Cond_prob_normal); +#endif } /* p0 is exception */