Commit fad022b1 authored by Matthias Braun's avatar Matthias Braun
Browse files

remove unused be_FrameLoad and be_FrameStore

[r15609]
parent d0bf4325
......@@ -1486,14 +1486,14 @@ static ir_node *gen_Proj(ir_node *node) {
ir_node *pred = get_Proj_pred(node);
long proj = get_Proj_proj(node);
if (is_Store(pred) || be_is_FrameStore(pred)) {
if (is_Store(pred)) {
if (proj == pn_Store_M) {
return be_transform_node(pred);
} else {
assert(0);
return new_r_Bad(irg);
}
} else if (is_Load(pred) || be_is_FrameLoad(pred)) {
} else if (is_Load(pred)) {
return gen_Proj_Load(node);
} else if (is_CopyB(pred)) {
return gen_Proj_CopyB(node);
......@@ -1712,8 +1712,6 @@ static void arm_register_transformers(void) {
GEN(be_FrameAddr);
//GEN(be_Call);
//GEN(be_Return);
BAD(be_FrameLoad); /* unsupported yet */
BAD(be_FrameStore); /* unsupported yet */
BAD(be_StackParam); /* unsupported yet */
GEN(be_AddSP);
GEN(be_SubSP);
......
......@@ -129,8 +129,6 @@ ir_op *op_be_SetSP;
ir_op *op_be_RegParams;
ir_op *op_be_StackParam;
ir_op *op_be_FrameAddr;
ir_op *op_be_FrameLoad;
ir_op *op_be_FrameStore;
ir_op *op_be_Barrier;
static int beo_base = -1;
......@@ -278,8 +276,6 @@ void be_node_init(void) {
op_be_SetSP = new_ir_op(beo_base + beo_SetSP, "be_SetSP", op_pin_state_pinned, N, oparity_binary, 0, sizeof(be_stack_attr_t), &be_node_op_ops);
op_be_RegParams = new_ir_op(beo_base + beo_RegParams, "be_RegParams", op_pin_state_pinned, N, oparity_zero, 0, sizeof(be_node_attr_t), &be_node_op_ops);
op_be_StackParam = new_ir_op(beo_base + beo_StackParam, "be_StackParam", op_pin_state_floats, N, oparity_unary, 0, sizeof(be_frame_attr_t), &be_node_op_ops);
op_be_FrameLoad = new_ir_op(beo_base + beo_FrameLoad, "be_FrameLoad", op_pin_state_floats, N, oparity_any, 0, sizeof(be_frame_attr_t), &be_node_op_ops);
op_be_FrameStore = new_ir_op(beo_base + beo_FrameStore, "be_FrameStore", op_pin_state_floats, N, oparity_any, 0, sizeof(be_frame_attr_t), &be_node_op_ops);
op_be_FrameAddr = new_ir_op(beo_base + beo_FrameAddr, "be_FrameAddr", op_pin_state_floats, N, oparity_unary, 0, sizeof(be_frame_attr_t), &be_node_op_ops);
op_be_Barrier = new_ir_op(beo_base + beo_Barrier, "be_Barrier", op_pin_state_pinned, N, oparity_dynamic, 0, sizeof(be_node_attr_t), &be_node_op_ops);
......@@ -313,10 +309,6 @@ void be_node_init(void) {
op_be_RegParams->ops.node_cmp_attr = node_cmp_attr;
set_op_tag(op_be_StackParam, &be_node_tag);
op_be_StackParam->ops.node_cmp_attr = FrameAddr_cmp_attr;
set_op_tag(op_be_FrameLoad, &be_node_tag);
op_be_FrameLoad->ops.node_cmp_attr = FrameAddr_cmp_attr;
set_op_tag(op_be_FrameStore, &be_node_tag);
op_be_FrameStore->ops.node_cmp_attr = FrameAddr_cmp_attr;
set_op_tag(op_be_FrameAddr, &be_node_tag);
op_be_FrameAddr->ops.node_cmp_attr = FrameAddr_cmp_attr;
set_op_tag(op_be_Barrier, &be_node_tag);
......@@ -844,43 +836,6 @@ ir_node *be_RegParams_append_out_reg(ir_node *regparams,
return proj;
}
ir_node *be_new_FrameLoad(const arch_register_class_t *cls_frame, const arch_register_class_t *cls_data,
ir_graph *irg, ir_node *bl, ir_node *mem, ir_node *frame, ir_entity *ent)
{
be_frame_attr_t *a;
ir_node *irn;
ir_node *in[2];
in[0] = mem;
in[1] = frame;
irn = new_ir_node(NULL, irg, bl, op_be_FrameLoad, mode_T, 2, in);
a = init_node_attr(irn, 3);
a->ent = ent;
a->offset = 0;
be_node_set_reg_class(irn, 1, cls_frame);
be_node_set_reg_class(irn, OUT_POS(pn_Load_res), cls_data);
return irn;
}
ir_node *be_new_FrameStore(const arch_register_class_t *cls_frame, const arch_register_class_t *cls_data,
ir_graph *irg, ir_node *bl, ir_node *mem, ir_node *frame, ir_node *data, ir_entity *ent)
{
be_frame_attr_t *a;
ir_node *irn;
ir_node *in[3];
in[0] = mem;
in[1] = frame;
in[2] = data;
irn = new_ir_node(NULL, irg, bl, op_be_FrameStore, mode_T, 3, in);
a = init_node_attr(irn, 3);
a->ent = ent;
a->offset = 0;
be_node_set_reg_class(irn, 1, cls_frame);
be_node_set_reg_class(irn, 2, cls_data);
return irn;
}
ir_node *be_new_FrameAddr(const arch_register_class_t *cls_frame, ir_graph *irg, ir_node *bl, ir_node *frame, ir_entity *ent)
{
be_frame_attr_t *a;
......@@ -978,8 +933,6 @@ int be_is_SubSP (const ir_node *irn) { return be_get_irn_opcode(irn) ==
int be_is_RegParams (const ir_node *irn) { return be_get_irn_opcode(irn) == beo_RegParams ; }
int be_is_StackParam (const ir_node *irn) { return be_get_irn_opcode(irn) == beo_StackParam ; }
int be_is_FrameAddr (const ir_node *irn) { return be_get_irn_opcode(irn) == beo_FrameAddr ; }
int be_is_FrameLoad (const ir_node *irn) { return be_get_irn_opcode(irn) == beo_FrameLoad ; }
int be_is_FrameStore (const ir_node *irn) { return be_get_irn_opcode(irn) == beo_FrameStore ; }
int be_is_Barrier (const ir_node *irn) { return be_get_irn_opcode(irn) == beo_Barrier ; }
int be_has_frame_entity(const ir_node *irn)
......@@ -988,8 +941,6 @@ int be_has_frame_entity(const ir_node *irn)
case beo_StackParam:
case beo_Spill:
case beo_Reload:
case beo_FrameStore:
case beo_FrameLoad:
case beo_FrameAddr:
return 1;
default:
......
......@@ -57,8 +57,6 @@ extern ir_op *op_be_SetSP;
extern ir_op *op_be_RegParams;
extern ir_op *op_be_StackParam;
extern ir_op *op_be_FrameAddr;
extern ir_op *op_be_FrameLoad;
extern ir_op *op_be_FrameStore;
extern ir_op *op_be_Barrier;
typedef enum {
......
......@@ -202,7 +202,6 @@ ir_node *search_def(be_ssa_construction_env_t *env, ir_node *at)
return create_phi(env, block, node);
}
DBG((dbg, LEVEL_3, "\t...continue at idom (after checking block)\n"));
return get_def_at_idom(env, block);
}
......
......@@ -3042,94 +3042,6 @@ static ir_node *gen_be_FrameAddr(ir_node *node) {
return res;
}
/**
* Transforms a FrameLoad into an ia32 Load.
*/
static ir_node *gen_be_FrameLoad(ir_node *node) {
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *mem = get_irn_n(node, be_pos_FrameLoad_mem);
ir_node *new_mem = be_transform_node(mem);
ir_node *ptr = get_irn_n(node, be_pos_FrameLoad_ptr);
ir_node *new_ptr = be_transform_node(ptr);
ir_node *new_op = NULL;
ir_graph *irg = current_ir_graph;
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *noreg = ia32_new_NoReg_gp(env_cg);
ir_entity *ent = arch_get_frame_entity(env_cg->arch_env, node);
ir_mode *mode = get_type_mode(get_entity_type(ent));
ir_node *projs[pn_Load_max];
ia32_collect_Projs(node, projs, pn_Load_max);
if (mode_is_float(mode)) {
if (USE_SSE2(env_cg)) {
new_op = new_rd_ia32_xLoad(dbgi, irg, block, new_ptr, noreg, new_mem);
}
else {
new_op = new_rd_ia32_vfld(dbgi, irg, block, new_ptr, noreg, new_mem, mode);
}
}
else {
new_op = new_rd_ia32_Load(dbgi, irg, block, new_ptr, noreg, new_mem);
}
set_irn_pinned(new_op, op_pin_state_floats);
set_ia32_frame_ent(new_op, ent);
set_ia32_use_frame(new_op);
set_ia32_op_type(new_op, ia32_AddrModeS);
set_ia32_am_flavour(new_op, ia32_am_B);
set_ia32_ls_mode(new_op, mode);
set_ia32_flags(new_op, get_ia32_flags(new_op) | arch_irn_flags_rematerializable);
SET_IA32_ORIG_NODE(new_op, ia32_get_old_node_name(env_cg, node));
return new_op;
}
/**
* Transforms a FrameStore into an ia32 Store.
*/
static ir_node *gen_be_FrameStore(ir_node *node) {
ir_node *block = be_transform_node(get_nodes_block(node));
ir_node *mem = get_irn_n(node, be_pos_FrameStore_mem);
ir_node *new_mem = be_transform_node(mem);
ir_node *ptr = get_irn_n(node, be_pos_FrameStore_ptr);
ir_node *new_ptr = be_transform_node(ptr);
ir_node *val = get_irn_n(node, be_pos_FrameStore_val);
ir_node *new_val = be_transform_node(val);
ir_node *new_op = NULL;
ir_graph *irg = current_ir_graph;
dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *noreg = ia32_new_NoReg_gp(env_cg);
ir_entity *ent = arch_get_frame_entity(env_cg->arch_env, node);
ir_mode *mode = get_irn_mode(val);
if (mode_is_float(mode)) {
if (USE_SSE2(env_cg)) {
new_op = new_rd_ia32_xStore(dbgi, irg, block, new_ptr, noreg, new_val, new_mem);
} else {
new_op = new_rd_ia32_vfst(dbgi, irg, block, new_ptr, noreg, new_val, new_mem, mode);
}
} else if (get_mode_size_bits(mode) == 8) {
new_op = new_rd_ia32_Store8Bit(dbgi, irg, block, new_ptr, noreg, new_val, new_mem);
} else {
new_op = new_rd_ia32_Store(dbgi, irg, block, new_ptr, noreg, new_val, new_mem);
}
set_ia32_frame_ent(new_op, ent);
set_ia32_use_frame(new_op);
set_ia32_op_type(new_op, ia32_AddrModeD);
set_ia32_am_flavour(new_op, ia32_am_B);
set_ia32_ls_mode(new_op, mode);
SET_IA32_ORIG_NODE(new_op, ia32_get_old_node_name(env_cg, node));
return new_op;
}
/**
* In case SSE is used we need to copy the result from XMM0 to FPU TOS before return.
*/
......@@ -4220,14 +4132,14 @@ static ir_node *gen_Proj(ir_node *node) {
ir_node *pred = get_Proj_pred(node);
long proj = get_Proj_proj(node);
if (is_Store(pred) || be_is_FrameStore(pred)) {
if (is_Store(pred)) {
if (proj == pn_Store_M) {
return be_transform_node(pred);
} else {
assert(0);
return new_r_Bad(irg);
}
} else if (is_Load(pred) || be_is_FrameLoad(pred)) {
} else if (is_Load(pred)) {
return gen_Proj_Load(node);
} else if (is_Div(pred) || is_Mod(pred) || is_DivMod(pred)) {
return gen_Proj_DivMod(node);
......@@ -4375,8 +4287,6 @@ static void register_transformers(void)
GEN(be_FrameAddr);
//GEN(be_Call);
GEN(be_Return);
GEN(be_FrameLoad);
GEN(be_FrameStore);
GEN(be_StackParam);
GEN(be_AddSP);
GEN(be_SubSP);
......
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