indentation changed
[libfirm] / ir / ana / execution_frequency.c
index e628169..bc8972f 100644 (file)
@@ -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) {
@@ -61,7 +61,7 @@ static INLINE void set_region_exec_freq(void *reg, double freq) {
   set_insert(exec_freq_set, &ef, sizeof(ef), exec_freq_hash(&ef));
 }
 
-INLINE double get_region_exec_freq(void *reg) {
+double get_region_exec_freq(void *reg) {
   reg_exec_freq ef, *found;
   ef.reg  = reg;
   assert(exec_freq_set);
@@ -222,7 +222,7 @@ static void walk_post(ir_node *n, void *env) {
 void precompute_cond_evaluation(void) {
   ir_node *c;
 
-  compute_outs(current_ir_graph);
+  compute_irg_outs(current_ir_graph);
 
   just_passed_a_Raise = 0;
   Cond_list = NULL;
@@ -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.