ident/ident_t.h \
ir/instrument.h \
ir/irargs_t.h \
- ir/irbitset.h \
ir/ircons_t.h \
ir/irdump_t.h \
ir/iredges_t.h \
#include "irgwalk.h"
#include "irprintf_t.h"
#include "irgopt.h"
-#include "irbitset.h"
#include "iropt_t.h"
#include "irtools.h"
#include "heights.h"
#include "irdump.h"
#include "irdom.h"
#include "irtools.h"
-#include "irbitset.h"
#include "debug.h"
#include "iredges.h"
#include "irdump.h"
#include "irdom.h"
#include "ircons.h"
-#include "irbitset.h"
#include "irnode.h"
#include "ircons.h"
#include "irtools.h"
#include "xmalloc.h"
#include "pdeq.h"
#include "irprintf.h"
-#include "irbitset.h"
#include "util.h"
#include "irtools.h"
#include "error.h"
#include "list.h"
#include "statev.h"
-#include "irbitset.h"
-
#include "bearch.h"
#include "beifg.h"
#include "be_t.h"
}
if (max_node) {
- bitset_t *visited = bitset_irg_malloc(env->co->irg);
+ bitset_t *visited = bitset_malloc(get_irg_last_idx(env->co->irg));
for (i = ARR_LEN(chunk->n); i != 0;)
- bitset_add_irn(visited, chunk->n[--i]);
+ bitset_set(visited, get_irn_idx(chunk->n[--i]));
pqueue_put(grow, (void *) max_node, max_weight);
- bitset_remv_irn(visited, max_node);
+ bitset_clear(visited, get_irn_idx(max_node));
i = 0;
while (!pqueue_empty(grow)) {
ir_node *irn = (ir_node*)pqueue_pop_front(grow);
co_gs_foreach_neighb(an, neigh) {
co_mst_irn_t *node = get_co_mst_irn(env, neigh->irn);
- if (bitset_contains_irn(visited, node->irn)) {
+ if (bitset_is_set(visited, get_irn_idx(node->irn))) {
pqueue_put(grow, (void *) neigh->irn, neigh->costs);
- bitset_remv_irn(visited, node->irn);
+ bitset_clear(visited, get_irn_idx(node->irn));
}
}
}
*/
static aff_chunk_t *fragment_chunk(co_mst_env_t *env, int col, aff_chunk_t *c, waitq *tmp)
{
- bitset_t *visited = bitset_irg_malloc(env->co->irg);
+ bitset_t *visited = bitset_malloc(get_irg_last_idx(env->co->irg));
int idx, len;
aff_chunk_t *best = NULL;
}
/* fragment the remaining chunk */
- visited = bitset_irg_malloc(env->co->irg);
+ visited = bitset_malloc(get_irg_last_idx(env->co->irg));
for (idx = 0, len = ARR_LEN(best_chunk->n); idx < len; ++idx)
bitset_set(visited, get_irn_idx(best_chunk->n[idx]));
#include "irprog.h"
#include "irloop_t.h"
#include "iredges_t.h"
-#include "irbitset.h"
#include "irprintf_t.h"
#include "irtools.h"
#include "util.h"
void co_complete_stats(const copy_opt_t *co, co_complete_stats_t *stat)
{
- bitset_t *seen = bitset_irg_malloc(co->irg);
+ bitset_t *seen = bitset_malloc(get_irg_last_idx(co->irg));
affinity_node_t *an;
memset(stat, 0, sizeof(stat[0]));
co_gs_foreach_aff_node(co, an) {
neighb_t *neigh;
stat->aff_nodes += 1;
- bitset_add_irn(seen, an->irn);
+ bitset_set(seen, get_irn_idx(an->irn));
co_gs_foreach_neighb(an, neigh) {
- if (!bitset_contains_irn(seen, neigh->irn)) {
+ if (!bitset_is_set(seen, get_irn_idx(neigh->irn))) {
stat->aff_edges += 1;
stat->max_costs += neigh->costs;
#include "irnode_t.h"
#include "irprintf.h"
#include "irtools.h"
-#include "irbitset.h"
#include "beifg.h"
#include "error.h"
#include "xmalloc.h"
ir_node *m;
be_ifg_foreach_neighbour(ifg, &neigh_it, n, m) {
- if (bitset_contains_irn(seen, m))
+ if (bitset_is_set(seen, get_irn_idx(m)))
continue;
if (arch_get_irn_register_req(m)->type & arch_register_req_type_ignore)
continue;
- bitset_add_irn(seen, m);
+ bitset_set(seen, get_irn_idx(m));
int_comp_rec(ifg, m, seen);
}
{
int n_comp = 0;
nodes_iter_t nodes_it;
- bitset_t *seen = bitset_irg_malloc(irg);
+ bitset_t *seen = bitset_malloc(get_irg_last_idx(irg));
ir_node *n;
be_ifg_foreach_node(ifg, &nodes_it, n) {
- if (bitset_contains_irn(seen, n))
+ if (bitset_is_set(seen, get_irn_idx(n)))
continue;
if (arch_get_irn_register_req(n)->type & arch_register_req_type_ignore)
continue;
++n_comp;
- bitset_add_irn(seen, n);
+ bitset_set(seen, get_irn_idx(n));
int_comp_rec(ifg, n, seen);
}
{
nodes_iter_t nodes_it;
neighbours_iter_t neigh_it;
- bitset_t *nodes = bitset_irg_malloc(irg);
+ bitset_t *nodes = bitset_malloc(get_irg_last_idx(irg));
ir_node *n, *m;
memset(stat, 0, sizeof(stat[0]));
be_ifg_foreach_node(ifg, &nodes_it, n) {
stat->n_nodes += 1;
be_ifg_foreach_neighbour(ifg, &neigh_it, n, m) {
- bitset_add_irn(nodes, n);
- stat->n_edges += !bitset_contains_irn(nodes, m);
+ bitset_set(nodes, get_irn_idx(n));
+ stat->n_edges += !bitset_is_set(nodes, get_irn_idx(m));
}
}
#include "iredges_t.h"
#include "irgwalk.h"
#include "irprintf_t.h"
-#include "irbitset.h"
#include "irdump_t.h"
#include "irnodeset.h"
mark_live_out(lv, block, def);
visited = re.visited;
- if (!bitset_contains_irn(visited, block)) {
- bitset_add_irn(visited, block);
+ if (!bitset_is_set(visited, get_irn_idx(block))) {
+ bitset_set(visited, get_irn_idx(block));
/*
* If this block is not the definition block, we have to go up
#include "irflag.h"
#include "irgmod.h"
#include "irgopt.h"
-#include "irbitset.h"
#include "irgopt.h"
#include "irdump.h"
#include "pdeq.h"
#include "irgmod.h"
#include "irgwalk.h"
#include "heights.h"
-#include "irbitset.h"
#include "irprintf.h"
#include "irdump.h"
#include "error.h"
+++ /dev/null
-/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
- *
- * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
- */
-
-/**
- * @file
- * @brief Some convenience macros for node bitmaps.
- * @author Sebastian Hack
- * @date 10.05.2006
- */
-#ifndef FIRM_IR_IRBITSET_H
-#define FIRM_IR_IRBITSET_H
-
-#include "bitset.h"
-
-#define bitset_irg_malloc(irg) bitset_malloc(get_irg_last_idx(irg))
-#define bitset_irg_alloca(irg) bitset_alloca(get_irg_last_idx(irg))
-#define bitset_irg_obstack_alloc(obst, irg) bitset_obstack_alloc(obst, get_irg_last_idx(irg))
-#define bitset_add_irn(bs, irn) bitset_set((bs), get_irn_idx(irn))
-#define bitset_remv_irn(bs, irn) bitset_clear((bs), get_irn_idx(irn))
-#define bitset_contains_irn(bs, irn) bitset_is_set((bs), get_irn_idx(irn))
-
-
-/* Internal use. */
-#define bsfe_get_irn_(irg, elm) (elm == (unsigned) -1 ? NULL : get_idx_irn((irg), (unsigned) elm))
-
-/**
- * Iterate over a bitset containing node indexes.
- * @param irg The graph the nodes are in.
- * @param bs The bitset containing the indexes.
- * @param elm A loop variable for the bitset
- * @param irn An ir_node * which is set to the current node.
- */
-#define bitset_foreach_irn(irg, bs, elm, irn) \
- for(elm = bitset_next_set(bs, 0), irn = bsfe_get_irn_(irg, elm); elm != (unsigned) -1; elm = bitset_next_set(bs, elm + 1), irn = bsfe_get_irn_(irg, elm))
-
-
-#endif