create execution frequencies from profile data
[libfirm] / ir / ana / execfreq.h
index 2fcc38b..b44acb4 100644 (file)
@@ -1,17 +1,39 @@
 #ifndef EXECFREQ_H_
 #define EXECFREQ_H_
+/*
+ * Project:     libFIRM
+ * File name:   ir/ana/execfreq.h
+ * Purpose:     Compute an estimate of basic block executions.
+ * Author:      Adam M. Szalkowski
+ * Modified by:
+ * Created:     28.05.2006
+ * CVS-ID:      $Id$
+ * Copyright:   (c) 2006 Universitaet Karlsruhe
+ * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ */
+#include "firm_types.h"
 
-#include "irgraph_t.h"
-#include "irnode_t.h"
-#include "set.h"
-
+struct _exec_freq_t;
 typedef struct _exec_freq_t exec_freq_t;
 
-exec_freq_t * compute_execfreq(ir_graph *irg, double loop_weight);
+/**
+ * Create execfreq structure (to be used with set_execfreq)
+ */
+exec_freq_t *create_execfreq(ir_graph *irg);
+
+/**
+ * Set execution frequency of a basic block
+ */
+void set_execfreq(exec_freq_t *ef, const ir_node *block, double freq);
+
+/**
+ * Create execfreq structure and initialze with estimated frequencies
+ */
+exec_freq_t *compute_execfreq(ir_graph *irg, double loop_weight);
 
 void free_execfreq(exec_freq_t *ef);
 
 double get_block_execfreq(const exec_freq_t *ef, const ir_node * irn);
 unsigned long get_block_execfreq_ulong(const exec_freq_t *ef, const ir_node *bb);
 
-#endif
+#endif /* EXECFREQ_H_ */