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

all: Use is_$OP(x) instead of get_irn_opcode(x) == iro_$OP.

parent c565b0f5
......@@ -241,7 +241,7 @@ static void dca_transfer(ir_node *irn)
if (is_Const(right)) {
ir_tarval *right_tv = get_Const_tarval(right);
care_for(left, tarval_shl(care, right_tv));
if (iro_Shrs == get_irn_opcode(irn)
if (is_Shrs(irn)
&& !tarval_is_null(tarval_and(tarval_shrs(get_tarval_min(mode), right_tv),
tarval_convert_to(care, mode))))
/* Care bits that disappeared still care about the sign bit. */
......
......@@ -254,7 +254,7 @@ static int get_num_successors(ir_node *irn)
else {
/* do not count keep-alive edges */
foreach_out_edge(irn, edge) {
if (get_irn_opcode(get_edge_src_irn(edge)) != iro_End)
if (!is_End(get_edge_src_irn(edge)))
sum++;
}
}
......
......@@ -558,7 +558,7 @@ static bool my_values_interfere(const ir_node *a, const ir_node *b)
if (b == user)
continue;
if (get_irn_opcode(user) == iro_End)
if (is_End(user))
continue;
/* in case of phi arguments we compare with the block the value comes from */
......
......@@ -765,7 +765,7 @@ static void dump_node_nodeattr(FILE *F, const ir_node *n)
long proj_nr = get_Proj_proj(n);
unsigned code = get_irn_opcode(pred);
if (code == iro_Proj && get_irn_opcode(get_Proj_pred(pred)) == iro_Start) {
if (code == iro_Proj && is_Start(get_Proj_pred(pred))) {
fprintf(F, "Arg %ld ", proj_nr);
} else {
bool found = false;
......
......@@ -267,11 +267,11 @@ static void irg_block_walk_2(ir_node *node, irg_walk_func *pre,
/* find the corresponding predecessor block. */
ir_node *pred = get_cf_op(get_Block_cfgpred(node, i));
pred = get_nodes_block(pred);
if (get_irn_opcode(pred) == iro_Block) {
if (is_Block(pred)) {
/* recursion */
irg_block_walk_2(pred, pre, post, env);
} else {
assert(get_irn_opcode(pred) == iro_Bad);
assert(is_Bad(pred));
}
}
......
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