From: Michael Beck Date: Wed, 13 Dec 2006 19:53:36 +0000 (+0000) Subject: rename type entity into ir_entity X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=213c4b9fb82f0fb180920fafe45123b225f9b2d1;p=libfirm rename type entity into ir_entity --- diff --git a/ir/be/mips/bearch_mips.c b/ir/be/mips/bearch_mips.c index c01caa55b..e3097307a 100644 --- a/ir/be/mips/bearch_mips.c +++ b/ir/be/mips/bearch_mips.c @@ -228,7 +228,7 @@ static arch_irn_flags_t mips_get_flags(const void *self, const ir_node *irn) { return 0; } -static entity *mips_get_frame_entity(const void *self, const ir_node *irn) { +static ir_entity *mips_get_frame_entity(const void *self, const ir_node *irn) { if(is_mips_load_r(irn) || is_mips_store_r(irn)) { mips_attr_t *attr = get_mips_attr(irn); @@ -238,7 +238,7 @@ static entity *mips_get_frame_entity(const void *self, const ir_node *irn) { return NULL; } -static void mips_set_frame_entity(const void *self, ir_node *irn, entity *ent) { +static void mips_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent) { mips_attr_t *attr = get_mips_attr(irn); assert(is_mips_load_r(irn) || is_mips_store_r(irn)); attr->stack_entity = ent; @@ -798,11 +798,11 @@ static ir_type *mips_abi_get_between_type(void *self) { static ir_type *debug_between_type = NULL; static ir_type *opt_between_type = NULL; - static entity *old_fp_ent = NULL; + static ir_entity *old_fp_ent = NULL; if(env->debug && debug_between_type == NULL) { - entity *a0_ent, *a1_ent, *a2_ent, *a3_ent; - entity *ret_addr_ent; + ir_entity *a0_ent, *a1_ent, *a2_ent, *a3_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_fp_type = new_type_primitive(new_id_from_str("fp"), mode_P); ir_type *old_param_type = new_type_primitive(new_id_from_str("param"), mode_Iu); @@ -825,7 +825,7 @@ static ir_type *mips_abi_get_between_type(void *self) { set_type_size_bytes(debug_between_type, 24); } else if(!env->debug && opt_between_type == NULL) { ir_type *old_fp_type = new_type_primitive(new_id_from_str("fp"), mode_P); - entity *old_fp_ent; + ir_entity *old_fp_ent; opt_between_type = new_type_class(new_id_from_str("mips_between_type")); old_fp_ent = new_entity(opt_between_type, new_id_from_str("old_fp"), old_fp_type); diff --git a/ir/be/mips/mips_emitter.c b/ir/be/mips/mips_emitter.c index aea578a43..7bdc5317f 100644 --- a/ir/be/mips/mips_emitter.c +++ b/ir/be/mips/mips_emitter.c @@ -387,16 +387,16 @@ static void mips_emit_Perm(const ir_node *node, mips_emit_env_t *env) static void mips_emit_Spill(const ir_node* node, mips_emit_env_t *env) { - FILE *F = env->out; - entity *ent = be_get_frame_entity(node); + FILE *F = env->out; + ir_entity *ent = be_get_frame_entity(node); lc_efprintf(mips_get_arg_env(), F, "\tsw %1S, %d($fp)\n", node, get_entity_offset(ent)); } static void mips_emit_Reload(const ir_node* node, mips_emit_env_t *env) { - FILE *F = env->out; - entity *ent = be_get_frame_entity(node); + FILE *F = env->out; + ir_entity *ent = be_get_frame_entity(node); lc_efprintf(mips_get_arg_env(), F, "\tlw %1D, %d($fp)\n", node, get_entity_offset(ent)); } @@ -411,7 +411,7 @@ static void mips_emit_Call(ir_node *node, mips_emit_env_t *env) const arch_register_t *callee_reg; // call to imediate value (label) - entity *callee = be_Call_get_entity(node); + ir_entity *callee = be_Call_get_entity(node); if(callee != NULL) { fprintf(F, "\tjal %s\n", get_entity_name(callee)); return; diff --git a/ir/be/mips/mips_gen_decls.c b/ir/be/mips/mips_gen_decls.c index b6afcb1d9..fcc307bbd 100644 --- a/ir/be/mips/mips_gen_decls.c +++ b/ir/be/mips/mips_gen_decls.c @@ -230,7 +230,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; @@ -281,7 +281,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; @@ -321,7 +321,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); @@ -366,7 +366,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)) { @@ -416,10 +416,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++) @@ -434,7 +434,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/mips/mips_nodes_attr.h b/ir/be/mips/mips_nodes_attr.h index e9df30ce1..b68eb835f 100644 --- a/ir/be/mips/mips_nodes_attr.h +++ b/ir/be/mips/mips_nodes_attr.h @@ -22,7 +22,7 @@ typedef struct _mips_attr_t { ir_mode *load_store_mode; /**< contains the mode of a load/store */ ir_mode *original_mode; /**< contains the original mode of the node */ } modes; - entity *stack_entity; /**< contains the entity on the stack for a load/store mode */ + ir_entity *stack_entity; /**< contains the entity on the stack for a load/store mode */ int stack_entity_offset; /**< contains the real stack offset for the entity */ int switch_default_pn; /**< proj number of default case in switch */ diff --git a/ir/be/mips/mips_transform.c b/ir/be/mips/mips_transform.c index 138dd4747..ff3ce37de 100644 --- a/ir/be/mips/mips_transform.c +++ b/ir/be/mips/mips_transform.c @@ -495,7 +495,7 @@ static ir_node *gen_node_for_Cond(mips_transform_env_t *env) static ir_node *create_conv_store_load(mips_transform_env_t *env, ir_mode* srcmode, ir_mode* dstmode) { ir_node *nomem, *store, *mem_proj, *value_proj, *load; - entity *mem_entity; + ir_entity *mem_entity; ir_node *node = env->irn; ir_node *pred = get_Conv_op(node); ir_node *sp; @@ -851,13 +851,13 @@ static void mips_fix_CopyB_Proj(mips_transform_env_t* env) { } static void mips_transform_Spill(mips_transform_env_t* env) { - ir_node *node = env->irn; - ir_node *sched_point = NULL; - ir_node *store, *proj; - ir_node *nomem = new_rd_NoMem(env->irg); - ir_node *ptr = get_irn_n(node, 0); - ir_node *val = get_irn_n(node, 1); - entity *ent = be_get_frame_entity(node); + ir_node *node = env->irn; + ir_node *sched_point = NULL; + ir_node *store, *proj; + ir_node *nomem = new_rd_NoMem(env->irg); + ir_node *ptr = get_irn_n(node, 0); + ir_node *val = get_irn_n(node, 1); + ir_entity *ent = be_get_frame_entity(node); mips_attr_t *attr; if(sched_is_scheduled(node)) { @@ -882,13 +882,13 @@ static void mips_transform_Spill(mips_transform_env_t* env) { } static void mips_transform_Reload(mips_transform_env_t* env) { - ir_node *node = env->irn; - ir_node *sched_point = NULL; - ir_node *load, *proj; - ir_node *ptr = get_irn_n(node, 0); - ir_node *mem = get_irn_n(node, 1); - ir_mode *mode = get_irn_mode(node); - entity *ent = be_get_frame_entity(node); + ir_node *node = env->irn; + ir_node *sched_point = NULL; + ir_node *load, *proj; + ir_node *ptr = get_irn_n(node, 0); + ir_node *mem = get_irn_n(node, 1); + ir_mode *mode = get_irn_mode(node); + ir_entity *ent = be_get_frame_entity(node); const arch_register_t* reg; mips_attr_t *attr;