projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename function
[libfirm]
/
ir
/
be
/
becopyheur.c
diff --git
a/ir/be/becopyheur.c
b/ir/be/becopyheur.c
index
6158c31
..
3b1c1d3
100644
(file)
--- a/
ir/be/becopyheur.c
+++ b/
ir/be/becopyheur.c
@@
-397,7
+397,7
@@
static inline void qnode_max_ind_set(qnode_t *qn, const unit_t *ou)
ir_node **safe, **unsafe;
int i, o, safe_count, safe_costs, unsafe_count, *unsafe_costs;
bitset_t *curr, *best;
ir_node **safe, **unsafe;
int i, o, safe_count, safe_costs, unsafe_count, *unsafe_costs;
bitset_t *curr, *best;
-
bitset_pos_t
pos;
+
unsigned
pos;
int next, curr_weight, best_weight = 0;
/* assign the nodes into two groups.
int next, curr_weight, best_weight = 0;
/* assign the nodes into two groups.
@@
-410,9
+410,9
@@
static inline void qnode_max_ind_set(qnode_t *qn, const unit_t *ou)
unsafe = ALLOCAN(ir_node*, ou->node_count - 1);
unsafe_costs = ALLOCAN(int, ou->node_count - 1);
unsafe_count = 0;
unsafe = ALLOCAN(ir_node*, ou->node_count - 1);
unsafe_costs = ALLOCAN(int, ou->node_count - 1);
unsafe_count = 0;
- for(i=1; i<ou->node_count; ++i) {
+ for
(i=1; i<ou->node_count; ++i) {
int is_safe = 1;
int is_safe = 1;
- for(o=1; o<ou->node_count; ++o) {
+ for
(o=1; o<ou->node_count; ++o) {
if (qnode_are_conflicting(qn, ou->nodes[i], ou->nodes[o])) {
if (i!=o) {
unsafe_costs[unsafe_count] = ou->costs[i];
if (qnode_are_conflicting(qn, ou->nodes[i], ou->nodes[o])) {
if (i!=o) {
unsafe_costs[unsafe_count] = ou->costs[i];
@@
-477,7
+477,7
@@
no_stable_set:
}
/* transfer the best set into the qn */
}
/* transfer the best set into the qn */
- qn->mis_size = 1+safe_count+bitset_popcnt(best);
+ qn->mis_size = 1+safe_count+bitset_popc
ou
nt(best);
qn->mis_costs = safe_costs+best_weight;
qn->mis[0] = ou->nodes[0]; /* the root is always in a max stable set */
next = 1;
qn->mis_costs = safe_costs+best_weight;
qn->mis[0] = ou->nodes[0]; /* the root is always in a max stable set */
next = 1;
@@
-552,8
+552,8
@@
static void ou_optimize(unit_t *ou)
qnode_t *tmp;
const arch_register_req_t *req;
bitset_t const* ignore;
qnode_t *tmp;
const arch_register_req_t *req;
bitset_t const* ignore;
-
bitset_pos_t
n_regs;
-
bitset_pos_t
idx;
+
unsigned
n_regs;
+
unsigned
idx;
int i;
DBG((dbg, LEVEL_1, "\tOptimizing unit:\n"));
int i;
DBG((dbg, LEVEL_1, "\tOptimizing unit:\n"));
@@
-567,7
+567,7
@@
static void ou_optimize(unit_t *ou)
ignore = ou->co->cenv->ignore_colors;
n_regs = req->cls->n_regs;
if (arch_register_req_is(req, limited)) {
ignore = ou->co->cenv->ignore_colors;
n_regs = req->cls->n_regs;
if (arch_register_req_is(req, limited)) {
-
rawbs_base_t
const* limited = req->limited;
+
unsigned
const* limited = req->limited;
for (idx = 0; idx != n_regs; ++idx) {
if (bitset_is_set(ignore, idx))
for (idx = 0; idx != n_regs; ++idx) {
if (bitset_is_set(ignore, idx))
@@
-653,6
+653,7
@@
int co_solve_heuristic(copy_opt_t *co)
return 0;
}
return 0;
}
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur);
void be_init_copyheur(void)
{
static co_algo_info copyheur = {
void be_init_copyheur(void)
{
static co_algo_info copyheur = {
@@
-662,5
+663,3
@@
void be_init_copyheur(void)
be_register_copyopt("heur1", ©heur);
FIRM_DBG_REGISTER(dbg, "ir.be.copyoptheur");
}
be_register_copyopt("heur1", ©heur);
FIRM_DBG_REGISTER(dbg, "ir.be.copyoptheur");
}
-
-BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur);