X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Fexecution_frequency.c;h=8765c71649d7960fe8482e56518a17b7ea0fb92e;hb=3da5ed2598245b896255bc444aaa1768f6098cfe;hp=e7e21e73c6587c1f5f740ea541d50de223e98b55;hpb=32ea6ea0320f551448bb66e534e3351977464d42;p=libfirm diff --git a/ir/ana/execution_frequency.c b/ir/ana/execution_frequency.c index e7e21e73c..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; @@ -153,8 +154,7 @@ Cond_prob get_ProjX_probability(ir_node *n) /* A walker that only visits the nodes we want to see. */ -static void -my_irg_walk_2_both(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void * env) +static void my_irg_walk_2_both(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void * env) { int i; set_irn_visited(node, current_ir_graph->visited); @@ -246,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; @@ -266,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 */