* @param bitset The bitset.
* @param elm A size_t variable.
*/
-#define bitset_foreach(bitset,elm) \
- for(elm = bitset_next_set(bitset,0); elm != (size_t)-1; elm = bitset_next_set(bitset,elm+1))
+#define bitset_foreach(bitset, elm) \
+ for (size_t elm = 0; (elm = bitset_next_set((bitset), elm)) != (size_t)-1; ++elm)
-#define bitset_foreach_clear(bitset,elm) \
- for(elm = bitset_next_clear(bitset,0); elm != (size_t) -1; elm = bitset_next_clear(bitset,elm+1))
+#define bitset_foreach_clear(bitset, elm) \
+ for (size_t elm = 0; (elm = bitset_next_clear((bitset), elm)) != (size_t)-1; ++elm)
/**
* Count the bits set.
bitset_t *tmp = bitset_alloca(lv->n_blocks);
bl_info_t *bi = get_block_info(lv, bl);
- size_t elm;
-
DBG((lv->dbg, LEVEL_2, "computing T_%d\n", bi->id));
/* put all back edge sources reachable (reduced) from here in tmp */
static inline void compute_back_edge_chains(lv_chk_t *lv)
{
- size_t elm;
int i, n;
DBG((lv->dbg, LEVEL_2, "back edge sources: %B\n", lv->back_edge_src));
int *assignment;
pmap *partners;
int i, n_alloc;
- size_t col;
ir_node *perm = NULL;
//int match_res, cost;
be_chordal_env_t *env = alloc_env->chordal_env;
DBG((dbg, LEVEL_2, "\tchecking reg of %+F: %s\n", proj, reg ? reg->name : "<none>"));
if (reg == NULL) {
- col = get_next_free_reg(alloc_env, bs);
+ size_t const col = get_next_free_reg(alloc_env, bs);
reg = arch_register_for_index(env->cls, col);
bitset_set(bs, reg->index);
arch_set_irn_register(proj, reg);
be_lv_t *lv = be_get_irg_liveness(env->irg);
int i, n;
- size_t elm;
unsigned step = 0;
unsigned pressure = 0;
struct list_head *head;
ir_node **safe, **unsafe;
int i, o, safe_count, safe_costs, unsafe_count, *unsafe_costs;
bitset_t *curr, *best;
- size_t pos;
int next, curr_weight, best_weight = 0;
/* assign the nodes into two groups.
bitset_t *forb = bitset_alloca(n_regs);
affinity_node_t *a = ci->aff;
- size_t elm;
const ir_node *pos;
neighbours_iter_t it;
int i;
be_ifg_t *ifg = env->co->cenv->ifg;
bitset_t *bs = bitset_alloca(n_regs);
- size_t elm;
const ir_node *irn;
neighbours_iter_t it;
*/
static void dbg_admissible_colors(const co_mst_env_t *env, const co_mst_irn_t *node)
{
- size_t idx;
(void) env;
if (bitset_popcount(node->adm_colors) < 1)
node->chunk = c;
if (node->constr_factor > REAL(0.0)) {
- size_t col;
bitset_foreach (node->adm_colors, col)
c->color_affinity[col].cost += node->constr_factor;
}
ir_node **safe, **unsafe;
int i, o, safe_count, safe_costs, unsafe_count, *unsafe_costs;
bitset_t *curr;
- size_t pos;
int curr_weight, best_weight = 0;
/* assign the nodes into two groups.
{
int res = 2;
bitset_t *b = (bitset_t*)arg->v_ptr;
- size_t p;
char buf[32];
const char *prefix = "";
int list_cnt;
int ref_cnt;
int edge_cnt;
- size_t idx;
const struct list_head *head;
const struct list_head *pos;
ir_graph *irg;