From 535e2c0b69eda6b699e1fc88bcb6e2785482a984 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 13 Dec 2006 19:54:48 +0000 Subject: [PATCH] rename type entity into ir_entity --- ir/be/arm/arm_emitter.c | 8 ++++---- ir/be/arm/arm_gen_decls.c | 18 ++++++++--------- ir/be/arm/arm_transform.c | 42 +++++++++++++++++++-------------------- ir/be/arm/bearch_arm.c | 8 ++++---- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/ir/be/arm/arm_emitter.c b/ir/be/arm/arm_emitter.c index b7c4e4bdf..e85b82424 100644 --- a/ir/be/arm/arm_emitter.c +++ b/ir/be/arm/arm_emitter.c @@ -100,10 +100,10 @@ static const char *node_offset_to_str(ir_node *n, char *buf, int buflen) { ir_op *irn_op = get_irn_op(n); if (irn_op == op_be_StackParam) { - entity *ent = be_get_frame_entity(n); + ir_entity *ent = be_get_frame_entity(n); offset = get_entity_offset(ent); } else if (irn_op == op_be_Reload || irn_op == op_be_Spill) { - entity *ent = be_get_frame_entity(n); + ir_entity *ent = be_get_frame_entity(n); offset = get_entity_offset(ent); } else if (irn_op == op_be_IncSP) { offset = - be_get_IncSP_offset(n); @@ -608,7 +608,7 @@ static void emit_arm_SwitchJmp(ir_node *irn, void *env) { static void emit_be_Call(ir_node *irn, void *env) { arm_emit_env_t *emit_env = env; FILE *F = emit_env->out; - entity *ent = be_Call_get_entity(irn); + ir_entity *ent = be_Call_get_entity(irn); char cmd_buf[SNPRINTF_BUF_LEN], cmnt_buf[SNPRINTF_BUF_LEN]; if (ent) @@ -905,7 +905,7 @@ void arm_gen_block(ir_node *block, void *env) { * Emits code for function start. */ void arm_emit_start(FILE *F, ir_graph *irg) { - entity *ent = get_irg_entity(irg); + ir_entity *ent = get_irg_entity(irg); const char *irg_name = get_entity_ld_name(ent); arm_switch_section(F, SECTION_TEXT); fprintf(F, "\t.align 2\n"); diff --git a/ir/be/arm/arm_gen_decls.c b/ir/be/arm/arm_gen_decls.c index 8f62d8890..6b2fb8d55 100644 --- a/ir/be/arm/arm_gen_decls.c +++ b/ir/be/arm/arm_gen_decls.c @@ -271,7 +271,7 @@ static void dump_atomic_init(struct obstack *obst, ir_node *init) * @param ent The entity * @return 1 if it is a string constant, 0 otherwise */ -static int ent_is_string_const(entity *ent) +static int ent_is_string_const(ir_entity *ent) { int res = 0; ir_type *ty; @@ -322,7 +322,7 @@ static int ent_is_string_const(entity *ent) * @param obst The obst to dump on. * @param ent The entity to dump. */ -static void dump_string_cst(struct obstack *obst, entity *ent) +static void dump_string_cst(struct obstack *obst, ir_entity *ent) { int i, n; @@ -362,7 +362,7 @@ struct arr_info { * Dumps the initialization of global variables that are not * "uninitialized". */ -static void dump_global(struct obstack *rdata_obstack, struct obstack *data_obstack, struct obstack *comm_obstack, entity *ent) +static void dump_global(struct obstack *rdata_obstack, struct obstack *data_obstack, struct obstack *comm_obstack, ir_entity *ent) { ir_type *ty = get_entity_type(ent); const char *ld_name = get_entity_ld_name(ent); @@ -409,7 +409,7 @@ static void dump_global(struct obstack *rdata_obstack, struct obstack *data_obst /* potential spare values should be already included! */ for (i = 0; i < get_compound_ent_n_values(ent); ++i) { - entity *step = get_compound_ent_value_member(ent, i); + ir_entity *step = get_compound_ent_value_member(ent, i); ir_type *stype = get_entity_type(step); if (get_type_mode(stype)) { @@ -459,10 +459,10 @@ static void dump_global(struct obstack *rdata_obstack, struct obstack *data_obst /* We wanna know how many arrays are on the path to the entity. We also have to know how * many elements each array holds to calculate the offset for the entity. */ for (j = 0; j < graph_length; j++) { - entity *step = get_compound_graph_path_node(path, j); - ir_type *step_type = get_entity_type(step); - int ty_size = (get_type_size_bits(step_type) + 7) >> 3; - int k, n = 0; + ir_entity *step = get_compound_graph_path_node(path, j); + ir_type *step_type = get_entity_type(step); + int ty_size = (get_type_size_bits(step_type) + 7) >> 3; + int k, n = 0; if (is_Array_type(step_type)) for (k = 0; k < get_array_n_dimensions(step_type); k++) @@ -477,7 +477,7 @@ static void dump_global(struct obstack *rdata_obstack, struct obstack *data_obst if (aipos) aipos--; for (offset = j = 0; j < graph_length; j++) { - entity *step = get_compound_graph_path_node(path, j); + ir_entity *step = get_compound_graph_path_node(path, j); ir_type *step_type = get_entity_type(step); int ent_ofs = get_entity_offset(step); int stepsize = 0; diff --git a/ir/be/arm/arm_transform.c b/ir/be/arm/arm_transform.c index d52ee02ee..f341c1d43 100644 --- a/ir/be/arm/arm_transform.c +++ b/ir/be/arm/arm_transform.c @@ -960,13 +960,13 @@ static int get_sp_expand_offset(ir_node *inc_sp) { static ir_node *gen_StackParam(ir_node *irn, arm_code_gen_t *cg) { #if 0 - ir_node *new_op = NULL; - ir_node *block = get_nodes_block(irn); - ir_node *noreg = ia32_new_NoReg_gp(env->cg); - ir_node *mem = new_rd_NoMem(env->irg); - ir_node *ptr = get_irn_n(irn, 0); - entity *ent = be_get_frame_entity(irn); - ir_mode *mode = env->mode; + ir_node *new_op = NULL; + ir_node *block = get_nodes_block(irn); + ir_node *noreg = ia32_new_NoReg_gp(env->cg); + ir_node *mem = new_rd_NoMem(env->irg); + ir_node *ptr = get_irn_n(irn, 0); + ir_entity *ent = be_get_frame_entity(irn); + ir_mode *mode = env->mode; // /* If the StackParam has only one user -> */ // /* put it in the Block where the user resides */ @@ -1005,7 +1005,7 @@ static ir_node *gen_StackParam(ir_node *irn, arm_code_gen_t *cg) { */ static ir_node *gen_be_FrameAddr(ir_node *irn, arm_code_gen_t *cg) { ir_node *block = get_nodes_block(irn); - entity *ent = be_get_frame_entity(irn); + ir_entity *ent = be_get_frame_entity(irn); int offset = get_entity_offset(ent); ir_node *op = get_irn_n(irn, 0); ir_node *cnst; @@ -1028,12 +1028,12 @@ static ir_node *gen_be_FrameAddr(ir_node *irn, arm_code_gen_t *cg) { */ static ir_node *gen_FrameLoad(ir_node *irn, arm_code_gen_t *cg) { #if 0 - ir_node *new_op = NULL; - ir_node *noreg = ia32_new_NoReg_gp(env->cg); - ir_node *mem = get_irn_n(irn, 0); - ir_node *ptr = get_irn_n(irn, 1); - entity *ent = be_get_frame_entity(irn); - ir_mode *mode = get_type_mode(get_entity_type(ent)); + ir_node *new_op = NULL; + ir_node *noreg = ia32_new_NoReg_gp(env->cg); + ir_node *mem = get_irn_n(irn, 0); + ir_node *ptr = get_irn_n(irn, 1); + ir_entity *ent = be_get_frame_entity(irn); + ir_mode *mode = get_type_mode(get_entity_type(ent)); if (mode_is_float(mode)) { if (USE_SSE2(env->cg)) @@ -1067,13 +1067,13 @@ static ir_node *gen_FrameLoad(ir_node *irn, arm_code_gen_t *cg) { */ static ir_node *gen_FrameStore(ir_node *irn, arm_code_gen_t *cg) { #if 0 - ir_node *new_op = NULL; - ir_node *noreg = ia32_new_NoReg_gp(env->cg); - ir_node *mem = get_irn_n(irn, 0); - ir_node *ptr = get_irn_n(irn, 1); - ir_node *val = get_irn_n(irn, 2); - entity *ent = be_get_frame_entity(irn); - ir_mode *mode = get_irn_mode(val); + ir_node *new_op = NULL; + ir_node *noreg = ia32_new_NoReg_gp(env->cg); + ir_node *mem = get_irn_n(irn, 0); + ir_node *ptr = get_irn_n(irn, 1); + ir_node *val = get_irn_n(irn, 2); + ir_entity *ent = be_get_frame_entity(irn); + ir_mode *mode = get_irn_mode(val); if (mode_is_float(mode)) { if (USE_SSE2(env->cg)) diff --git a/ir/be/arm/bearch_arm.c b/ir/be/arm/bearch_arm.c index b2e392495..b3866e215 100644 --- a/ir/be/arm/bearch_arm.c +++ b/ir/be/arm/bearch_arm.c @@ -228,12 +228,12 @@ static arch_irn_flags_t arm_get_flags(const void *self, const ir_node *irn) { return 0; } -static entity *arm_get_frame_entity(const void *self, const ir_node *irn) { +static ir_entity *arm_get_frame_entity(const void *self, const ir_node *irn) { /* TODO: return the entity assigned to the frame */ return NULL; } -static void arm_set_frame_entity(const void *self, ir_node *irn, entity *ent) { +static void arm_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent) { /* TODO: set the entity assigned to the frame */ } @@ -814,10 +814,10 @@ const arch_register_class_t *arm_get_reg_class_for_mode(const void *self, const */ static ir_type *arm_get_between_type(void *self) { static ir_type *between_type = NULL; - static entity *old_bp_ent = NULL; + static ir_entity *old_bp_ent = NULL; if(!between_type) { - entity *ret_addr_ent; + ir_entity *ret_addr_ent; ir_type *ret_addr_type = new_type_primitive(new_id_from_str("return_addr"), mode_P); ir_type *old_bp_type = new_type_primitive(new_id_from_str("bp"), mode_P); -- 2.20.1