X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Fexecution_frequency.c;h=bc8972fe3501bddaf0b0b40cb9ba0b1a6f5dd734;hb=f4966a36b81eb80781aa4478d3b4987cacb28c64;hp=ef545816626a1bcdfcfe15668edaf6b058fd545c;hpb=a58a82dcc39d39e7797cdfe3912bac5363e2a7b9;p=libfirm diff --git a/ir/ana/execution_frequency.c b/ir/ana/execution_frequency.c index ef5458166..bc8972fe3 100644 --- a/ir/ana/execution_frequency.c +++ b/ir/ana/execution_frequency.c @@ -18,6 +18,7 @@ #include "firm_common_t.h" #include "set.h" #include "pdeq.h" +#include "hashptr.h" #include "irprog_t.h" #include "irgraph_t.h" @@ -49,9 +50,8 @@ static int exec_freq_cmp(const void *e1, const void *e2, size_t size) { return (ef1->reg != ef2->reg); } -static INLINE unsigned int exec_freq_hash(void *e) { - unsigned int v = (unsigned int) ((reg_exec_freq *)e)->reg; - return v ^ (v>>8); +static INLINE unsigned int exec_freq_hash(reg_exec_freq *e) { + return HASH_PTR(e->reg); } static INLINE void set_region_exec_freq(void *reg, double freq) { @@ -278,7 +278,7 @@ int is_fragile_Proj(ir_node *n) { static double exception_prob = 0.001; static INLINE int is_loop_head(ir_node *cond) { - return false; + return 0; } /** Weight a single region in edge.