summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bepbqpcoloring.c
diff options
context:
space:
mode:
authorMatthias Braun <matthias.braun@kit.edu>2012-07-30 18:30:51 +0200
committerMatthias Braun <matthias.braun@kit.edu>2012-07-30 18:30:51 +0200
commit0a7d7324b9baa076d1322e82b92f8fc2c8f1892e (patch)
tree55f52998d7e35eff3ac31c5c5526a6aca84d1891 /ir/be/bepbqpcoloring.c
parent5d18527fff162c842c152aff38b6d28e4eddef8e (diff)
simplify and cleanup execfreq API
Diffstat (limited to 'ir/be/bepbqpcoloring.c')
-rw-r--r--ir/be/bepbqpcoloring.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ir/be/bepbqpcoloring.c b/ir/be/bepbqpcoloring.c
index 542dfd4..36dad0a 100644
--- a/ir/be/bepbqpcoloring.c
+++ b/ir/be/bepbqpcoloring.c
@@ -37,7 +37,7 @@
#include "irgwalk.h"
#include "irtools.h"
#include "time.h"
-#include "execfreq.h"
+#include "execfreq_t.h"
#include "bipartite.h"
/* libfirm/ir/be includes */
@@ -90,6 +90,7 @@ typedef struct be_pbqp_alloc_env_t {
plist_t *rpeo;
unsigned *restr_nodes;
unsigned *ife_edge_num;
+ ir_execfreq_int_factors execfreq_factors;
be_chordal_env_t *env;
} be_pbqp_alloc_env_t;
@@ -218,10 +219,9 @@ static void insert_afe_edge(be_pbqp_alloc_env_t *pbqp_alloc_env, ir_node *src_no
if (get_edge(pbqp, get_irn_idx(src_node), get_irn_idx(trg_node)) == NULL) {
if (use_exec_freq) {
/* get exec_freq for copy_block */
- ir_node *root_bl = get_nodes_block(src_node);
- ir_node *copy_bl = is_Phi(src_node) ? get_Block_cfgpred_block(root_bl, pos) : root_bl;
- ir_exec_freq *exec_freq = be_get_irg_exec_freq(pbqp_alloc_env->irg);
- unsigned long res = get_block_execfreq_ulong(exec_freq, copy_bl);
+ ir_node *root_bl = get_nodes_block(src_node);
+ ir_node *copy_bl = is_Phi(src_node) ? get_Block_cfgpred_block(root_bl, pos) : root_bl;
+ int res = get_block_execfreq_int(&pbqp_alloc_env->execfreq_factors, copy_bl);
/* create afe-matrix */
unsigned row, col;
@@ -641,6 +641,7 @@ static void be_pbqp_coloring(be_chordal_env_t *env)
dump_ir_graph(irg, buf);
}
+ ir_calculate_execfreq_int_factors(&pbqp_alloc_env.execfreq_factors, irg);
/* initialize pbqp allocation data structure */
pbqp_alloc_env.pbqp_inst = alloc_pbqp(get_irg_last_idx(irg)); /* initialize pbqp instance */