rename type entity into ir_entity
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 13 Dec 2006 19:53:36 +0000 (19:53 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 13 Dec 2006 19:53:36 +0000 (19:53 +0000)
ir/be/mips/bearch_mips.c
ir/be/mips/mips_emitter.c
ir/be/mips/mips_gen_decls.c
ir/be/mips/mips_nodes_attr.h
ir/be/mips/mips_transform.c

index c01caa5..e309730 100644 (file)
@@ -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);
index aea578a..7bdc531 100644 (file)
@@ -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;
index b6afcb1..fcc307b 100644 (file)
@@ -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;
index e9df30c..b68eb83 100644 (file)
@@ -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 */
 
index 138dd47..ff3ce37 100644 (file)
@@ -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;