Commit c0bef4f5 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

s/Block_not_block_visited(x)/!Block_block_visited(x)/.

[r21831]
parent 3233c81f
......@@ -375,7 +375,6 @@ int is_Block_dead(const ir_node *block);
/* For this current_ir_graph must be set. */
void mark_Block_block_visited(ir_node *node);
int Block_not_block_visited(const ir_node *node);
int Block_block_visited(const ir_node *node);
#ifdef INTERPROCEDURAL_VIEW
......
......@@ -637,13 +637,12 @@ static int init_construction(ir_graph *irg, irg_walk_func *pre) {
ir_node *pred = get_End_keepalive(end, i);
if (is_Block(pred)) {
if (Block_not_block_visited(pred)) {
/* we found a endless loop */
dec_irg_block_visited(irg);
irg_block_walk(pred, pre, NULL, &n_blocks);
}
else
if (Block_block_visited(pred))
continue;
/* we found an endless loop */
dec_irg_block_visited(irg);
irg_block_walk(pred, pre, NULL, &n_blocks);
}
in[j++] = pred;
}
......
......@@ -233,7 +233,7 @@ static void irg_out_block_walk2(ir_node *bl,
void *env) {
int i, n;
if (Block_not_block_visited(bl)) {
if (!Block_block_visited(bl)) {
mark_Block_block_visited(bl);
if (pre)
......
......@@ -953,7 +953,7 @@ static void irg_block_edges_walk2(ir_node *bl,
void *env) {
const ir_edge_t *edge, *next;
if (Block_not_block_visited(bl)) {
if (!Block_block_visited(bl)) {
mark_Block_block_visited(bl);
if (pre)
......
......@@ -574,7 +574,7 @@ static void irg_block_walk_2(ir_node *node, irg_walk_func *pre, irg_walk_func *p
{
int i;
if (Block_not_block_visited(node)) {
if (!Block_block_visited(node)) {
mark_Block_block_visited(node);
if(pre) pre(node, env);
......
......@@ -732,10 +732,6 @@ void (mark_Block_block_visited)(ir_node *node) {
_mark_Block_block_visited(node);
}
int (Block_not_block_visited)(const ir_node *node) {
return _Block_not_block_visited(node);
}
int (Block_block_visited)(const ir_node *node) {
return _Block_block_visited(node);
}
......
......@@ -817,12 +817,6 @@ _mark_Block_block_visited(ir_node *node) {
node->attr.block.block_visited = get_irg_block_visited(current_ir_graph);
}
static INLINE int
_Block_not_block_visited(const ir_node *node) {
assert(node->op == op_Block);
return (node->attr.block.block_visited < get_irg_block_visited(current_ir_graph));
}
static INLINE int
_Block_block_visited(const ir_node *node) {
assert(node->op == op_Block);
......@@ -1099,7 +1093,6 @@ _is_arg_Proj(const ir_node *node) {
#define get_Block_block_visited(node) _get_Block_block_visited(node)
#define set_Block_block_visited(node, visit) _set_Block_block_visited(node, visit)
#define mark_Block_block_visited(node) _mark_Block_block_visited(node)
#define Block_not_block_visited(node) _Block_not_block_visited(node)
#define Block_block_visited(node) _Block_block_visited(node)
#define set_Block_dead(block) _set_Block_dead(block)
#define is_Block_dead(block) _is_Block_dead(block)
......
......@@ -434,8 +434,7 @@ static void optimize_blocks(ir_node *b, void *ctx) {
if (is_Block_dead(pred)) {
/* case Phi 1: Do nothing */
}
else if (is_Block_removable(pred) && Block_not_block_visited(pred)) {
} else if (is_Block_removable(pred) && !Block_block_visited(pred)) {
/* case Phi 2: It's an empty block and not yet visited. */
ir_node *phi_pred = get_Phi_pred(phi, i);
......@@ -478,7 +477,7 @@ static void optimize_blocks(ir_node *b, void *ctx) {
for (k = 0, n = get_Block_n_cfgpreds(b); k < n; ++k) {
ir_node *predb = get_nodes_block(get_Block_cfgpred(b, k));
if (is_Block_removable(predb) && Block_not_block_visited(predb)) {
if (is_Block_removable(predb) && !Block_block_visited(predb)) {
ir_node *next_phi;
/* we found a predecessor block at position k that will be removed */
......@@ -505,7 +504,7 @@ static void optimize_blocks(ir_node *b, void *ctx) {
if (is_Block_dead(pred)) {
/* Do nothing */
} else if (is_Block_removable(pred) && Block_not_block_visited(pred)) {
} else if (is_Block_removable(pred) && !Block_block_visited(pred)) {
/* It's an empty block and not yet visited. */
for (j = 0; j < get_Block_n_cfgpreds(pred); j++) {
if (! is_Bad(get_Block_cfgpred(pred, j)))
......@@ -529,7 +528,7 @@ static void optimize_blocks(ir_node *b, void *ctx) {
if (is_Block_dead(pred)) {
/* Do nothing */
} else if (is_Block_removable(pred) && Block_not_block_visited(pred)) {
} else if (is_Block_removable(pred) && !Block_block_visited(pred)) {
/* It's an empty block and not yet visited. */
for (j = 0; j < get_Block_n_cfgpreds(pred); j++) {
if (! is_Bad(get_Block_cfgpred(pred, j)))
......@@ -561,7 +560,7 @@ static void optimize_blocks(ir_node *b, void *ctx) {
if (is_Block_dead(pred)) {
/* case 1: Do nothing */
} else if (is_Block_removable(pred) && Block_not_block_visited(pred)) {
} else if (is_Block_removable(pred) && !Block_block_visited(pred)) {
/* case 2: It's an empty block and not yet visited. */
assert(get_Block_n_cfgpreds(b) > 1);
/* Else it should be optimized by equivalent_node. */
......@@ -791,7 +790,7 @@ restart:
if (irn_not_visited(ka)) {
ir_op *op = get_irn_op(ka);
if ((op == op_Block) && Block_not_block_visited(ka)) {
if ((op == op_Block) && !Block_block_visited(ka)) {
/* irg_block_walk() will increase the block visited flag, but we must visit only
these blocks that are not visited yet, so decrease it first. */
set_irg_block_visited(irg, get_irg_block_visited(irg) - 1);
......
......@@ -921,7 +921,7 @@ static void split_memory_edge(ir_node *irn, void *ctx) {
else
irn_blk = get_nodes_block(irn);
if (Block_not_block_visited(irn_blk)) {
if (!Block_block_visited(irn_blk)) {
/* We sync first the stored scalar address in this block.*/
mark_Block_block_visited(irn_blk);
sync_stored_scalars(irn_blk, env);
......@@ -988,7 +988,7 @@ static ir_node *find_vnum_value(ir_node *block, unsigned vnum)
int i;
ir_node *res;
if (Block_not_block_visited(block)) {
if (!Block_block_visited(block)) {
mark_Block_block_visited(block);
val_arr = get_irn_link(block);
......
......@@ -370,7 +370,7 @@ static int WalkMem(ir_graph* irg, ir_node* node, ir_node* last_block)
if (block != last_block) {
DB((dbg, LEVEL_3, "===> Changing block from %+F to %+F\n", last_block, block));
block_change = 1;
if (Block_not_block_visited(block)) {
if (!Block_block_visited(block)) {
mark_Block_block_visited(block);
} else {
DB((dbg, LEVEL_2, "===> Hit already visited block at %+F\n", node));
......@@ -410,7 +410,7 @@ static int WalkMem(ir_graph* irg, ir_node* node, ir_node* last_block)
ir_node* unknown;
DB((dbg, LEVEL_3, "===> The predecessor was not finished yet\n"));
assert(!Block_not_block_visited(pred_block));
assert(Block_block_visited(pred_block));
unknown = new_r_Unknown(irg, mode_M);
for (i = 0; i < count_addrs; i++) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment