Commit 7c907708 authored by Matthias Braun's avatar Matthias Braun
Browse files

Cleanup after def92e0a

Properly use get_irn_pinned/set_irn_pinned as bool value instead of
comparing setting the ir_op enum values.
parent 145c60da
......@@ -290,8 +290,7 @@ static void handle_if(ir_node *block, ir_node *cmp, ir_relation rel, env_t *env)
env->num_eq += 1;
} else if (block_dominates(blk, cond_block)
&& is_Const(right)
&& get_irn_pinned(user) == op_pin_state_floats) {
&& is_Const(right) && !get_irn_pinned(user)) {
/*
* left == Const and we found a movable user of left in a
* dominator of the Cond block
......
......@@ -336,7 +336,7 @@ static ir_node *create_float_const(dbg_info *dbgi, ir_node *block,
pn_res = pn_amd64_movs_xmm_res;
}
arch_set_irn_register_reqs_in(load, mem_reqs);
set_irn_pinned(load, op_pin_state_floats);
set_irn_pinned(load, false);
return be_new_Proj(load, pn_res);
}
......@@ -1664,7 +1664,7 @@ static ir_node *gen_Call(ir_node *node)
arch_set_irn_register_reqs_in(store, reqs);
set_irn_pinned(store, op_pin_state_floats);
set_irn_pinned(store, false);
sync_ins[sync_arity++] = store;
}
......
......@@ -1276,12 +1276,12 @@ static ir_node *ints_to_double(dbg_info *dbgi, ir_node *block, ir_node *node0,
arm_mode_gp, NULL, 0, 4, true);
ir_node *in[] = { str0, str1 };
ir_node *sync = new_r_Sync(block, ARRAY_SIZE(in), in);
set_irn_pinned(str0, op_pin_state_floats);
set_irn_pinned(str1, op_pin_state_floats);
set_irn_pinned(str0, false);
set_irn_pinned(str1, false);
ir_node *ldf = new_bd_arm_Ldf(dbgi, block, stack, sync, mode_D, NULL, 0, 0,
true);
set_irn_pinned(ldf, op_pin_state_floats);
set_irn_pinned(ldf, false);
return be_new_Proj(ldf, pn_arm_Ldf_res);
}
......@@ -1293,11 +1293,11 @@ static ir_node *int_to_float(dbg_info *dbgi, ir_node *block, ir_node *node)
ir_node *nomem = get_irg_no_mem(irg);
ir_node *str = new_bd_arm_Str(dbgi, block, stack, node, nomem,
arm_mode_gp, NULL, 0, 0, true);
set_irn_pinned(str, op_pin_state_floats);
set_irn_pinned(str, false);
ir_node *ldf = new_bd_arm_Ldf(dbgi, block, stack, str, mode_F, NULL, 0, 0,
true);
set_irn_pinned(ldf, op_pin_state_floats);
set_irn_pinned(ldf, false);
return be_new_Proj(ldf, pn_arm_Ldf_res);
}
......@@ -1309,11 +1309,11 @@ static ir_node *float_to_int(dbg_info *dbgi, ir_node *block, ir_node *node)
ir_node *nomem = get_irg_no_mem(irg);
ir_node *stf = new_bd_arm_Stf(dbgi, block, stack, node, nomem, mode_F,
NULL, 0, 0, true);
set_irn_pinned(stf, op_pin_state_floats);
set_irn_pinned(stf, false);
ir_node *ldr = new_bd_arm_Ldr(dbgi, block, stack, stf, arm_mode_gp,
NULL, 0, 0, true);
set_irn_pinned(ldr, op_pin_state_floats);
set_irn_pinned(ldr, false);
return be_new_Proj(ldr, pn_arm_Ldr_res);
}
......@@ -1326,14 +1326,14 @@ static void double_to_ints(dbg_info *dbgi, ir_node *block, ir_node *node,
ir_node *nomem = get_irg_no_mem(irg);
ir_node *stf = new_bd_arm_Stf(dbgi, block, stack, node, nomem, mode_D,
NULL, 0, 0, true);
set_irn_pinned(stf, op_pin_state_floats);
set_irn_pinned(stf, false);
ir_node *ldr0 = new_bd_arm_Ldr(dbgi, block, stack, stf, arm_mode_gp, NULL,
0, 0, true);
set_irn_pinned(ldr0, op_pin_state_floats);
set_irn_pinned(ldr0, false);
ir_node *ldr1 = new_bd_arm_Ldr(dbgi, block, stack, stf, arm_mode_gp, NULL,
0, 4, true);
set_irn_pinned(ldr1, op_pin_state_floats);
set_irn_pinned(ldr1, false);
*out_value0 = be_new_Proj(ldr0, pn_arm_Ldr_res);
*out_value1 = be_new_Proj(ldr1, pn_arm_Ldr_res);
......@@ -1540,7 +1540,7 @@ static ir_node *gen_Proj_Proj_Start(ir_node *node)
param->entity, 0, 0, true);
value = be_new_Proj(load, pn_arm_Ldr_res);
}
set_irn_pinned(load, op_pin_state_floats);
set_irn_pinned(load, false);
return value;
}
......
......@@ -407,7 +407,7 @@ static ir_node *gen_Const(ir_node *node)
ir_node *base = get_global_base(irg);
load = new_bd_ia32_xLoad(dbgi, block, base, noreg_GP, nomem,
mode);
set_irn_pinned(load, op_pin_state_floats);
set_irn_pinned(load, false);
set_ia32_op_type(load, ia32_AddrModeS);
set_am_const_entity(load, floatent);
arch_add_irn_flags(load, arch_irn_flag_rematerializable);
......@@ -428,7 +428,7 @@ static ir_node *gen_Const(ir_node *node)
ir_node *base = get_global_base(irg);
load = new_bd_ia32_fld(dbgi, block, base, noreg_GP, nomem,
ls_mode);
set_irn_pinned(load, op_pin_state_floats);
set_irn_pinned(load, false);
set_ia32_op_type(load, ia32_AddrModeS);
set_am_const_entity(load, floatent);
arch_add_irn_flags(load, arch_irn_flag_rematerializable);
......@@ -799,7 +799,7 @@ struct ia32_address_mode_t {
ia32_op_type_t op_type;
ir_node *new_op1;
ir_node *new_op2;
op_pin_state pinned;
bool pinned : 1;
unsigned commutative : 1;
unsigned ins_permuted : 1;
};
......@@ -843,7 +843,7 @@ static void build_address(ia32_address_mode_t *am, ir_node *node,
addr->tls_segment = false;
addr->use_frame = false;
am->ls_mode = get_type_mode(get_entity_type(entity));
am->pinned = op_pin_state_floats;
am->pinned = false;
return;
}
......@@ -887,10 +887,10 @@ static void set_am_attributes(ir_node *node, const ia32_address_mode_t *am)
set_ia32_op_type(node, am->op_type);
set_ia32_ls_mode(node, am->ls_mode);
if (am->pinned == op_pin_state_pinned) {
if (am->pinned) {
/* beware: some nodes are already pinned and did not allow to change the state */
if (get_irn_pinned(node) != op_pin_state_pinned)
set_irn_pinned(node, op_pin_state_pinned);
if (!get_irn_pinned(node))
set_irn_pinned(node, true);
}
if (am->commutative)
set_ia32_commutative(node);
......@@ -2322,7 +2322,7 @@ static ir_node *gen_Load(ir_node *node)
set_ia32_ls_mode(new_node, mode);
set_address(new_node, &addr);
if (get_irn_pinned(node) == op_pin_state_floats) {
if (!get_irn_pinned(node)) {
assert((int)pn_ia32_xLoad_res == (int)pn_ia32_fld_res
&& (int)pn_ia32_fld_res == (int)pn_ia32_Load_res
&& (int)pn_ia32_Load_res == (int)pn_ia32_res);
......@@ -2672,10 +2672,8 @@ static ir_node *try_create_dest_am(ir_node *node)
return NULL;
}
if (new_node != NULL && get_irn_pinned(new_node) != op_pin_state_pinned
&& get_irn_pinned(node) == op_pin_state_pinned) {
set_irn_pinned(new_node, op_pin_state_pinned);
}
if (new_node != NULL && !get_irn_pinned(new_node) && get_irn_pinned(node))
set_irn_pinned(new_node, true);
return new_node;
}
......@@ -3600,7 +3598,7 @@ static ir_node *gen_Mux(ir_node *node)
.ls_mode = new_mode,
.mem_proj = nomem,
.op_type = ia32_AddrModeS,
.pinned = op_pin_state_floats,
.pinned = false,
.commutative = true,
};
......@@ -3612,7 +3610,7 @@ static ir_node *gen_Mux(ir_node *node)
load = new_bd_ia32_fld(dbgi, new_block, am.addr.base,
am.addr.index, am.addr.mem, new_mode);
}
set_irn_pinned(load, op_pin_state_floats);
set_irn_pinned(load, false);
set_am_attributes(load, &am);
return be_new_Proj(load, pn_ia32_res);
......@@ -3762,7 +3760,7 @@ static ir_node *gen_x87_fp_to_gp(ir_node *node)
ir_node *frame = get_irg_frame(irg);
ir_node *fist = gen_fist(dbgi, block, frame, noreg_GP, nomem, new_op);
set_irn_pinned(fist, op_pin_state_floats);
set_irn_pinned(fist, false);
set_ia32_op_type(fist, ia32_AddrModeD);
arch_add_irn_flags(fist, arch_irn_flag_spill);
......@@ -3784,7 +3782,7 @@ static ir_node *gen_x87_fp_to_gp(ir_node *node)
/* do a Load */
ir_node *load = new_bd_ia32_Load(dbgi, block, frame, noreg_GP, mem);
set_irn_pinned(load, op_pin_state_floats);
set_irn_pinned(load, false);
set_ia32_op_type(load, ia32_AddrModeS);
set_ia32_ls_mode(load, ia32_mode_gp);
force_int_stackent(load, ls_mode);
......@@ -3805,7 +3803,7 @@ static ir_node *gen_x87_conv(ir_mode *tgt_mode, ir_node *node)
ir_node *store = new_bd_ia32_fst(dbgi, block, frame, noreg_GP, nomem, node,
tgt_mode);
set_irn_pinned(store, op_pin_state_floats);
set_irn_pinned(store, false);
set_ia32_frame_use(store, IA32_FRAME_USE_AUTO);
set_ia32_op_type(store, ia32_AddrModeD);
arch_add_irn_flags(store, arch_irn_flag_spill);
......@@ -3815,7 +3813,7 @@ static ir_node *gen_x87_conv(ir_mode *tgt_mode, ir_node *node)
ir_node *load = new_bd_ia32_fld(dbgi, block, frame, noreg_GP, store_mem,
tgt_mode);
set_irn_pinned(load, op_pin_state_floats);
set_irn_pinned(load, false);
set_ia32_frame_use(load, IA32_FRAME_USE_AUTO);
set_ia32_op_type(load, ia32_AddrModeS);
SET_IA32_ORIG_NODE(load, node);
......@@ -3856,7 +3854,7 @@ static void store_gp(dbg_info *dbgi, ia32_address_mode_t *am, ir_node *block,
ir_node *store = new_bd_ia32_Store(dbgi, new_block, frame, noreg_GP,
nomem, new_node);
set_irn_pinned(store, op_pin_state_floats);
set_irn_pinned(store, false);
set_ia32_op_type(store, ia32_AddrModeD);
set_ia32_ls_mode(store, ia32_mode_gp);
arch_add_irn_flags(store, arch_irn_flag_spill);
......@@ -3872,7 +3870,7 @@ static void store_gp(dbg_info *dbgi, ia32_address_mode_t *am, ir_node *block,
ir_node *const zero_store = new_bd_ia32_Store(dbgi, new_block, frame, noreg_GP, nomem, zero_const);
ir_node *const zero_store_mem = be_new_Proj(zero_store, pn_ia32_Store_M);
set_irn_pinned(zero_store, op_pin_state_floats);
set_irn_pinned(zero_store, false);
set_ia32_op_type(zero_store, ia32_AddrModeD);
add_ia32_am_offs_int(zero_store, 4);
set_ia32_ls_mode(zero_store, ia32_mode_gp);
......@@ -3898,7 +3896,7 @@ static void store_gp(dbg_info *dbgi, ia32_address_mode_t *am, ir_node *block,
addr->use_frame = true;
am->op_type = ia32_AddrModeS;
am->ls_mode = store_mode;
am->pinned = op_pin_state_floats;
am->pinned = false;
}
/**
......@@ -4070,7 +4068,7 @@ static void store_fp(dbg_info *dbgi, ia32_address_mode_t *am, ir_node *block,
ir_node *fst = new_bd_ia32_fst(dbgi, new_block, frame, noreg_GP, nomem,
new_value, mode);
set_irn_pinned(fst, op_pin_state_floats);
set_irn_pinned(fst, false);
set_ia32_op_type(fst, ia32_AddrModeD);
arch_add_irn_flags(fst, arch_irn_flag_spill);
force_int_stackent(fst, mode);
......@@ -4085,7 +4083,7 @@ static void store_fp(dbg_info *dbgi, ia32_address_mode_t *am, ir_node *block,
addr->use_frame = true;
am->op_type = ia32_AddrModeS;
am->ls_mode = mode;
am->pinned = op_pin_state_floats;
am->pinned = false;
}
static ir_node *gen_Bitcast(ir_node *const node)
......@@ -4509,8 +4507,8 @@ static ir_node *gen_ia32_l_LLtoFloat(ir_node *node)
ir_node *const mem_low = be_new_Proj(store_low, pn_ia32_Store_M);
ir_node *const mem_high = be_new_Proj(store_high, pn_ia32_Store_M);
set_irn_pinned(store_low, op_pin_state_floats);
set_irn_pinned(store_high, op_pin_state_floats);
set_irn_pinned(store_low, false);
set_irn_pinned(store_high, false);
set_ia32_op_type(store_low, ia32_AddrModeD);
set_ia32_op_type(store_high, ia32_AddrModeD);
set_ia32_ls_mode(store_low, ia32_mode_gp);
......@@ -4526,7 +4524,7 @@ static ir_node *gen_ia32_l_LLtoFloat(ir_node *node)
/* do a fild */
ir_node *fild = new_bd_ia32_fild(dbgi, block, frame, noreg_GP, sync);
set_irn_pinned(fild, op_pin_state_floats);
set_irn_pinned(fild, false);
set_ia32_op_type(fild, ia32_AddrModeS);
set_ia32_ls_mode(fild, mode_Ls);
force_int_stackent(fild, mode_Ls);
......@@ -4554,7 +4552,7 @@ static ir_node *gen_ia32_l_LLtoFloat(ir_node *node)
.op_type = ia32_AddrModeS,
.new_op1 = res,
.new_op2 = ia32_new_NoReg_fp(irg),
.pinned = op_pin_state_floats,
.pinned = false,
.commutative = true,
};
......@@ -4580,7 +4578,7 @@ static ir_node *gen_ia32_l_FloattoLL(ir_node *node)
ir_node *new_val = be_transform_node(val);
ir_node *fist = gen_fist(dbgi, block, frame, noreg_GP, nomem, new_val);
set_irn_pinned(fist, op_pin_state_floats);
set_irn_pinned(fist, false);
SET_IA32_ORIG_NODE(fist, node);
set_ia32_op_type(fist, ia32_AddrModeD);
set_ia32_ls_mode(fist, mode_Ls);
......@@ -4602,7 +4600,7 @@ static ir_node *gen_Proj_l_FloattoLL(ir_node *node)
unsigned pn = get_Proj_num(node);
ir_node *load = new_bd_ia32_Load(dbgi, block, frame, noreg_GP, new_pred);
set_irn_pinned(load, op_pin_state_floats);
set_irn_pinned(load, false);
SET_IA32_ORIG_NODE(load, node);
set_ia32_op_type(load, ia32_AddrModeS);
set_ia32_ls_mode(load, ia32_mode_gp);
......@@ -4985,7 +4983,7 @@ static ir_node *gen_Call(ir_node *node)
},
};
ir_node *const store = create_store(dbgi, block, value, &store_addr);
set_irn_pinned(store, op_pin_state_floats);
set_irn_pinned(store, false);
sync_ins[sync_arity++] = create_proj_for_store(store, pn_Store_M);
}
}
......@@ -5021,8 +5019,8 @@ static ir_node *gen_Call(ir_node *node)
add_pressure);
SET_IA32_ORIG_NODE(call, node);
if (get_irn_pinned(node) == op_pin_state_pinned)
set_irn_pinned(call, op_pin_state_pinned);
if (get_irn_pinned(node))
set_irn_pinned(call, true);
set_am_attributes(call, &am);
ir_node *const res = fix_mem_proj(call, &am);
......@@ -5142,7 +5140,7 @@ static ir_node *make_load_from_frame(ir_node *const node, ir_entity *(*const get
};
set_ia32_frame_use(load, IA32_FRAME_USE_AUTO);
if (get_irn_pinned(node) == op_pin_state_floats) {
if (!get_irn_pinned(node)) {
assert((int)pn_ia32_xLoad_res == (int)pn_ia32_fld_res
&& (int)pn_ia32_fld_res == (int)pn_ia32_Load_res
&& (int)pn_ia32_Load_res == (int)pn_ia32_res);
......
......@@ -512,7 +512,7 @@ static ir_node *pick_delay_slot_for(ir_node *node)
if (has_delay_slot(schedpoint))
break;
/* can't move pinned nodes accross blocks */
if (get_irn_pinned(schedpoint) == op_pin_state_pinned)
if (get_irn_pinned(schedpoint))
continue;
/* restore doesn't model register window switching correctly,
* so it appears like we could move it, which is not true */
......
......@@ -1202,7 +1202,7 @@ static ir_node *gen_float_const(dbg_info *dbgi, ir_node *block, ir_tarval *tv)
= create_ldf(dbgi, block, hi, mem, mode, entity, 0, false);
ir_node *proj = be_new_Proj(new_op, pn_sparc_Ldf_res);
set_irn_pinned(new_op, op_pin_state_floats);
set_irn_pinned(new_op, false);
return proj;
}
......@@ -1427,8 +1427,8 @@ static ir_node *create_ftoi(dbg_info *dbgi, ir_node *block, ir_node *op,
ir_node *ld = new_bd_sparc_Ld_imm(dbgi, block, sp, stf, mode_gp,
NULL, 0, true);
ir_node *res = be_new_Proj(ld, pn_sparc_Ld_res);
set_irn_pinned(stf, op_pin_state_floats);
set_irn_pinned(ld, op_pin_state_floats);
set_irn_pinned(stf, false);
set_irn_pinned(ld, false);
return res;
}
......@@ -1445,8 +1445,8 @@ static ir_node *create_itof(dbg_info *dbgi, ir_node *block, ir_node *op,
NULL, 0, true);
ir_node *res = be_new_Proj(ldf, pn_sparc_Ldf_res);
unsigned bits = get_mode_size_bits(dst_mode);
set_irn_pinned(st, op_pin_state_floats);
set_irn_pinned(ldf, op_pin_state_floats);
set_irn_pinned(st, false);
set_irn_pinned(ldf, false);
if (bits == 32) {
return new_bd_sparc_fitof_s(dbgi, block, res, dst_mode);
......@@ -1660,7 +1660,7 @@ static ir_node *bitcast_int_to_float(dbg_info *dbgi, ir_node *block,
ir_node *st = new_bd_sparc_St_imm(dbgi, block, value0, sp, nomem,
mode_gp, NULL, 0, true);
arch_add_irn_flags(st, arch_irn_flag_spill);
set_irn_pinned(st, op_pin_state_floats);
set_irn_pinned(st, false);
ir_mode *mode;
ir_node *mem;
......@@ -1670,7 +1670,7 @@ static ir_node *bitcast_int_to_float(dbg_info *dbgi, ir_node *block,
arch_add_irn_flags(st1, arch_irn_flag_spill);
ir_node *in[2] = { st, st1 };
ir_node *sync = new_r_Sync(block, 2, in);
set_irn_pinned(st1, op_pin_state_floats);
set_irn_pinned(st1, false);
mem = sync;
mode = mode_fp2;
} else {
......@@ -1679,7 +1679,7 @@ static ir_node *bitcast_int_to_float(dbg_info *dbgi, ir_node *block,
}
ir_node *ldf = create_ldf(dbgi, block, sp, mem, mode, NULL, 0, true);
set_irn_pinned(ldf, op_pin_state_floats);
set_irn_pinned(ldf, false);
return be_new_Proj(ldf, pn_sparc_Ldf_res);
}
......@@ -1711,16 +1711,16 @@ static void bitcast_float_to_int(dbg_info *dbgi, ir_node *block,
ir_node *stf = create_stf(dbgi, block, new_value, stack, nomem,
float_mode, NULL, 0, true);
arch_add_irn_flags(stf, arch_irn_flag_spill);
set_irn_pinned(stf, op_pin_state_floats);
set_irn_pinned(stf, false);
ir_node *ld = new_bd_sparc_Ld_imm(dbgi, block, stack, stf, mode_gp, NULL, 0, true);
set_irn_pinned(ld, op_pin_state_floats);
set_irn_pinned(ld, false);
result[0] = be_new_Proj(ld, pn_sparc_Ld_res);
if (bits == 64) {
ir_node *ld2 = new_bd_sparc_Ld_imm(dbgi, block, stack, stf, mode_gp,
NULL, 4, true);
set_irn_pinned(ld, op_pin_state_floats);
set_irn_pinned(ld, false);
result[1] = be_new_Proj(ld2, pn_sparc_Ld_res);
arch_add_irn_flags(ld, (arch_irn_flags_t)sparc_arch_irn_flag_needs_64bit_spillslot);
......@@ -1835,7 +1835,7 @@ static ir_node *gen_Call(ir_node *node)
str = new_bd_sparc_St_imm(dbgi, new_block, partial_value, incsp,
new_mem, mode, NULL, offset, true);
}
set_irn_pinned(str, op_pin_state_floats);
set_irn_pinned(str, false);
sync_ins[sync_arity++] = str;
}
......@@ -2210,8 +2210,8 @@ static ir_node *gen_Bitcast(ir_node *node)
arch_add_irn_flags(st, arch_irn_flag_spill);
ir_node *const ldf = create_ldf(dbgi, new_block, sp, st, dst_mode, NULL, 0, true);
ir_node *const res = be_new_Proj(ldf, pn_sparc_Ldf_res);
set_irn_pinned(st, op_pin_state_floats);
set_irn_pinned(ldf, op_pin_state_floats);
set_irn_pinned(st, false);
set_irn_pinned(ldf, false);
return res;
}
case irma_ieee754: {
......@@ -2222,8 +2222,8 @@ static ir_node *gen_Bitcast(ir_node *node)
arch_add_irn_flags(stf, arch_irn_flag_spill);
ir_node *const ld = new_bd_sparc_Ld_imm(dbgi, new_block, sp, stf, dst_mode, NULL, 0, true);
ir_node *const res = be_new_Proj(ld, pn_sparc_Ld_res);
set_irn_pinned(stf, op_pin_state_floats);
set_irn_pinned(ld, op_pin_state_floats);
set_irn_pinned(stf, false);
set_irn_pinned(ld, false);
return res;
}
default:
......@@ -2391,7 +2391,7 @@ static ir_node *gen_Proj_Proj_Start(ir_node *node)
param->entity, 0, true);
value = be_new_Proj(load, pn_sparc_Ld_res);
}
set_irn_pinned(load, op_pin_state_floats);
set_irn_pinned(load, false);
return value;
}
......
......@@ -549,8 +549,7 @@ const char *get_irg_dump_name(const ir_graph *irg)
static int node_floats(const ir_node *n)
{
ir_graph *irg = get_irn_irg(n);
return ((get_irn_pinned(n) == op_pin_state_floats) &&
(get_irg_pinned(irg) == op_pin_state_floats));
return !get_irn_pinned(n) && get_irg_pinned(irg) == op_pin_state_floats;
}
/**
......@@ -600,10 +599,9 @@ static void collect_node(ir_node *node, void *env)
/** Construct lists to walk ir block-wise.
*
* Collects all blocks, nodes not op_pin_state_pinned,
* Bad, NoMem and Unknown into a flexible array in link field of
* irg they belong to. Sets the irg link field to NULL in all
* graphs not visited.
* Collects all blocks, nodes not pinned, Bad, NoMem and Unknown into a
* flexible array in link field of irg they belong to. Sets the irg link field
* to NULL in all graphs not visited.
* Free the list with DEL_ARR_F().
*/
static ir_node **construct_block_lists(ir_graph *irg)
......@@ -1291,7 +1289,7 @@ static void dump_whole_block(FILE *F, const ir_node *block)
}
/** dumps a graph block-wise. Expects all blockless nodes in arr in irgs link.
* The outermost nodes: blocks and nodes not op_pin_state_pinned, Bad, Unknown. */
* The outermost nodes: blocks and nodes not pinned, Bad, Unknown. */
static void dump_block_graph(FILE *F, ir_graph *irg, ir_node **arr)
{
for (size_t i = 0, n = ARR_LEN(arr); i < n; ++i) {
......
......@@ -102,7 +102,7 @@ void dump_irnode_to_file(FILE *const F, const ir_node *const n)
if (irg != get_const_code_irg())
fprintf (F, " irg: %s\n", get_ent_dump_name(get_irg_entity(irg)));
if (get_irn_pinned(n) == op_pin_state_floats &&
if (!get_irn_pinned(n) &&
get_irg_pinned(get_irn_irg(n)) == op_pin_state_floats) {
fprintf(F, " node was pinned in ");
ir_node *const block = get_nodes_block(n);
......@@ -329,7 +329,7 @@ void dump_irnode_to_file(FILE *const F, const ir_node *const n)
ident **clobber = get_ASM_clobbers(n);
for (int i = 0, n_clobbers = get_ASM_n_clobbers(n); i < n_clobbers; ++i)
fprintf(F, "%s ", get_id_str(clobber[i]));
if (get_irn_pinned(n) != op_pin_state_floats)
if (get_irn_pinned(n))
fprintf(F, "\n volatile");
fprintf(F, "\n");
break;
......
......@@ -4806,7 +4806,7 @@ static ir_node *transform_node_Proj_Div(ir_node *proj)
ir_node *new_mem = get_Div_mem(div);
new_mem = skip_Pin(new_mem);
set_Div_mem(div, new_mem);
set_irn_pinned(div, op_pin_state_floats);
set_irn_pinned(div, false);
}
unsigned proj_nr = get_Proj_num(proj);
......@@ -4830,7 +4830,7 @@ static ir_node *transform_node_Proj_Div(ir_node *proj)
/* This node can only float up to the Confirm block */
new_mem = new_r_Pin(get_nodes_block(confirm), new_mem);
}
set_irn_pinned(div, op_pin_state_floats);
set_irn_pinned(div, false);
/* this is a Div without exception, we can remove the memory edge */
set_Div_mem(div, new_mem);
return res;
......@@ -4858,7 +4858,7 @@ static ir_node *transform_node_Proj_Mod(ir_node *proj)
ir_node *new_mem = get_Mod_mem(mod);
new_mem = skip_Pin(new_mem);
set_Mod_mem(mod, new_mem);
set_irn_pinned(mod, op_pin_state_floats);
set_irn_pinned(mod, false);
}
unsigned proj_nr = get_Proj_num(proj);
......@@ -7448,7 +7448,7 @@ static ir_node *transform_node_Load(ir_node *n)
const ir_node *confirm;
if (value_not_null(ptr, &confirm) && confirm == NULL) {
set_irn_pinned(n, op_pin_state_floats);
set_irn_pinned(n, false);
}
/* if our memory predecessor is a load from the same address, then reuse the
......@@ -7538,7 +7538,7 @@ static ir_node *transform_node_Store(ir_node *n)
const ir_node *confirm;
if (value_not_null(ptr, &confirm) && confirm == NULL) {
set_irn_pinned(n, op_pin_state_floats);
set_irn_pinned(n, false);
}
return n;
}
......@@ -7723,7 +7723,7 @@ int identities_cmp(const void *elt, const void *key)
if (is_Block(a))
return 1;
if (get_irn_pinned(a) == op_pin_state_pinned) {
if (get_irn_pinned(a)) {
/* for pinned nodes, the block inputs must be equal */
if (get_nodes_block(a) != get_nodes_block(b))
return 1;
......@@ -7939,7 +7939,7 @@ ir_node *optimize_node(ir_node *n)
*
* Checks whether n is already available.
* The block input is used to distinguish different subexpressions. Right
* now all nodes are op_pin_state_pinned to blocks, i.e., the CSE only finds common
* now all nodes are pinned to blocks, i.e., the CSE only finds common
* subexpressions within a block.
*/
if (get_opt_cse())
......@@ -7983,7 +7983,7 @@ ir_node *optimize_in_place_2(ir_node *n)
/** common subexpression elimination **/
/* Checks whether n is already available. */
/* The block input is used to distinguish different subexpressions.
* Right now all nodes are op_pin_state_pinned to blocks, i.e., the cse
* Right now all nodes are pinned to blocks, i.e., the cse
* only finds common subexpressions within a block. */
if (get_opt_cse()) {
ir_node *o = n;
......
......@@ -1049,13 +1049,6 @@ int irn_verify(const ir_node *const n)
fine = false;
}
}
if (get_op_pinned(op) >= op_pin_state_exc_pinned) {
op_pin_state state = get_irn_pinned(n);
if (state != op_pin_state_floats && state != op_pin_state_pinned) {
warn(n, "invalid pin state (%d)", (int)state);
fine = false;
}
}
if (op->ops.verify_node != NULL)
fine &= op->ops.verify_node(n);
......
......@@ -279,7 +279,7 @@ int i_mapper_pow(ir_node *call)
}
irn = new_r_Const_one(irg, mode);
div = new_rd_Div(dbg, block, mem, irn, left, mode, op_pin_state_pinned);
div = new_rd_Div(dbg, block, mem, irn, left, mode, true);
mem = new_r_Proj(div, mode_M, pn_Div_M);
irn = new_r_Proj(div, mode, pn_Div_res);
if (ir_throws_exception(call)) {
......
......@@ -429,9 +429,8 @@ static void collect_phis(ir_node *node, void *env)
}
/* Ignore control flow nodes, these will be removed. */
if (get_irn_pinned(node) == op_pin_state_pinned &&