From: Michael Beck Date: Wed, 13 Dec 2006 19:47:34 +0000 (+0000) Subject: rename type entity into ir_entity X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=d0d85962ef52c14950db90e5981a7bea36023ab3;p=libfirm rename type entity into ir_entity [r8452] --- diff --git a/ir/ana/analyze_irg_args.c b/ir/ana/analyze_irg_args.c index 7be1f34de..bfed9def0 100644 --- a/ir/ana/analyze_irg_args.c +++ b/ir/ana/analyze_irg_args.c @@ -83,7 +83,7 @@ static unsigned analyze_arg(ir_node *arg, unsigned bits) } else { ir_op *op = get_irn_op(ptr); - entity *meth_ent; + ir_entity *meth_ent; if (op == op_SymConst && get_SymConst_kind(ptr) == symconst_addr_ent) { meth_ent = get_SymConst_entity(ptr); @@ -182,7 +182,7 @@ static unsigned analyze_arg(ir_node *arg, unsigned bits) * * @param irg The ir graph to analyze. */ -static void analyze_ent_args(entity *ent) +static void analyze_ent_args(ir_entity *ent) { ir_graph *irg; ir_node *irg_args, *arg; @@ -268,7 +268,7 @@ static void analyze_ent_args(entity *ent) */ void analyze_irg_args(ir_graph *irg) { - entity *ent; + ir_entity *ent; if (irg == get_const_code_irg()) return; @@ -285,7 +285,7 @@ void analyze_irg_args(ir_graph *irg) * Compute for a method with pointer parameter(s) * if they will be read or written. */ -ptr_access_kind get_method_param_access(entity *ent, int pos) +ptr_access_kind get_method_param_access(ir_entity *ent, int pos) { ir_type *mtp = get_entity_type(ent); int is_variadic = get_method_variadicity(mtp) == variadicity_variadic; @@ -389,7 +389,7 @@ static float calc_method_param_weight(ir_node *arg) * * @param ent The entity of the ir_graph. */ -static void analyze_method_params_weight(entity *ent) +static void analyze_method_params_weight(ir_entity *ent) { ir_type *mtp; ir_graph *irg; @@ -441,7 +441,7 @@ static void analyze_method_params_weight(entity *ent) * Compute for a method with pointer parameter(s) * if they will be read or written. */ -float get_method_param_weight(entity *ent, int pos) +float get_method_param_weight(ir_entity *ent, int pos) { ir_type *mtp = get_entity_type(ent); int is_variadic = get_method_variadicity(mtp) == variadicity_variadic; @@ -472,7 +472,7 @@ float get_method_param_weight(entity *ent, int pos) */ void analyze_irg_args_weight(ir_graph *irg) { - entity *ent; + ir_entity *ent; ent = get_irg_entity(irg); if (! ent) diff --git a/ir/ana/analyze_irg_args.h b/ir/ana/analyze_irg_args.h index 681922179..e4b6d50b1 100644 --- a/ir/ana/analyze_irg_args.h +++ b/ir/ana/analyze_irg_args.h @@ -25,7 +25,7 @@ * If the pos'th parameter is NOT of a pointer type, ptr_access_none * is returned; */ -ptr_access_kind get_method_param_access(entity *ent, int pos); +ptr_access_kind get_method_param_access(ir_entity *ent, int pos); /** * Analyze how pointer arguments of a given @@ -42,7 +42,7 @@ void analyze_irg_args(ir_graph *irg); * * The values are calculation on demand only. */ -float get_method_param_weight(entity *ent, int pos); +float get_method_param_weight(ir_entity *ent, int pos); /** * Analyze the parameters of a given ir graph. diff --git a/ir/ana/callgraph.c b/ir/ana/callgraph.c index 8e6891e0a..e23a0eade 100644 --- a/ir/ana/callgraph.c +++ b/ir/ana/callgraph.c @@ -188,7 +188,7 @@ static void ana_Call(ir_node *n, void *env) { irg = get_irn_irg(n); n_callees = get_Call_n_callees(n); for (i = 0; i < n_callees; ++i) { - entity *callee_e = get_Call_callee(n, i); + ir_entity *callee_e = get_Call_callee(n, i); ir_graph *callee = get_entity_irg(callee_e); if (callee) { @@ -1326,7 +1326,7 @@ int get_irg_recursion_depth(ir_graph *irg) { } void analyse_loop_nesting_depth(void) { - entity **free_methods = NULL; + ir_entity **free_methods = NULL; int arr_len; /* establish preconditions. */ diff --git a/ir/ana/cgana.c b/ir/ana/cgana.c index 5c42bc046..614f4d102 100644 --- a/ir/ana/cgana.c +++ b/ir/ana/cgana.c @@ -71,7 +71,7 @@ static eset *entities = NULL; /** Returns the entity that contains the implementation of the inherited * entity if available, else returns the entity passed. */ -static entity *get_inherited_methods_implementation(entity *inh_meth) { +static ir_entity *get_inherited_methods_implementation(ir_entity *inh_meth) { assert(get_atomic_ent_value(inh_meth) && "constant entity without value"); assert((get_irn_op(get_atomic_ent_value(inh_meth)) == op_SymConst) && (get_SymConst_kind(get_atomic_ent_value(inh_meth)) == symconst_addr_ent) && @@ -93,9 +93,9 @@ static entity *get_inherited_methods_implementation(entity *inh_meth) { * @param size Number of entities in set. * @param open */ -static void collect_impls(entity *method, eset *set, int *size, int *open) { +static void collect_impls(ir_entity *method, eset *set, int *size, int *open) { int i; - entity *impl; + ir_entity *impl; /* Add the implementation to the set if it contains an irg, else remember that there are more methods called. */ @@ -123,10 +123,10 @@ static void collect_impls(entity *method, eset *set, int *size, int *open) { * * @param method */ -static entity ** get_impl_methods(entity * method) { +static ir_entity ** get_impl_methods(ir_entity * method) { eset * set = eset_create(); int size = 0; - entity ** arr; + ir_entity ** arr; int open = 0; /* Collect all method entities that can be called here */ @@ -137,14 +137,14 @@ static entity ** get_impl_methods(entity * method) { /* keine implementierte überschriebene Methode */ arr = NULL; } else if (open) { - entity * ent; - arr = NEW_ARR_F(entity *, size + 1); + ir_entity * ent; + arr = NEW_ARR_F(ir_entity *, size + 1); arr[0] = NULL; /* Represents open method */ for (ent = eset_first(set); size > 0; ent = eset_next(set), --size) arr[size] = ent; } else { - entity * ent; - arr = NEW_ARR_F(entity *, size); + ir_entity * ent; + arr = NEW_ARR_F(ir_entity *, size); for (size -= 1, ent = eset_first(set); size >= 0; ent = eset_next(set), --size) arr[size] = ent; } @@ -174,7 +174,7 @@ static entity ** get_impl_methods(entity * method) { */ static void sel_methods_walker(ir_node * node, void *env) { pmap *ldname_map = env; - entity **arr; + ir_entity **arr; /* Call standard optimizations */ if (is_Sel(node)) { @@ -195,7 +195,7 @@ static void sel_methods_walker(ir_node * node, void *env) { } else if (get_irn_op(node) == op_Sel && is_Method_type(get_entity_type(get_Sel_entity(node)))) { - entity * ent = get_SymConst_entity(get_atomic_ent_value(get_Sel_entity(node))); + ir_entity * ent = get_SymConst_entity(get_atomic_ent_value(get_Sel_entity(node))); assert(get_entity_peculiarity(ent) != peculiarity_inherited); if (!eset_contains(entities, ent)) { @@ -252,7 +252,7 @@ static void sel_methods_init(void) { assert(entities == NULL); entities = eset_create(); for (i = get_irp_n_irgs() - 1; i >= 0; --i) { - entity * ent = get_irg_entity(get_irp_irg(i)); + ir_entity * ent = get_irg_entity(get_irp_irg(i)); /* only external visible methods are allowed to call by a SymConst_ptr_name */ if (get_entity_visibility(ent) != visibility_local) { pmap_insert(ldname_map, (void *) get_entity_ld_ident(ent), ent); @@ -276,10 +276,10 @@ static void sel_methods_init(void) { * * @param sel the Sel node */ -static entity ** get_Sel_arr(ir_node * sel) { - static entity ** NULL_ARRAY = NULL; - entity * ent; - entity ** arr; +static ir_entity ** get_Sel_arr(ir_node * sel) { + static ir_entity ** NULL_ARRAY = NULL; + ir_entity * ent; + ir_entity ** arr; assert(is_Sel(sel)); ent = get_Sel_entity(sel); @@ -293,7 +293,7 @@ static entity ** get_Sel_arr(ir_node * sel) { /* "NULL" zeigt an, dass keine Implementierung existiert. Dies * kann für polymorphe (abstrakte) Methoden passieren. */ if (!NULL_ARRAY) { - NULL_ARRAY = NEW_ARR_F(entity *, 0); + NULL_ARRAY = NEW_ARR_F(ir_entity *, 0); } return NULL_ARRAY; } @@ -311,8 +311,8 @@ static int get_Sel_n_methods(ir_node * sel) { /** * Returns the ith possible called method entity at a Sel node. */ -static entity * get_Sel_method(ir_node * sel, int pos) { - entity ** arr = get_Sel_arr(sel); +static ir_entity * get_Sel_method(ir_node * sel, int pos) { + ir_entity ** arr = get_Sel_arr(sel); assert(pos >= 0 && pos < ARR_LEN(arr)); return arr[pos]; } @@ -383,7 +383,7 @@ static void free_mark(ir_node *node, eset * set) { switch (get_irn_opcode(node)) { case iro_Sel: { - entity * ent = get_Sel_entity(node); + ir_entity * ent = get_Sel_entity(node); if (is_Method_type(get_entity_type(ent))) { for (i = get_Sel_n_methods(node) - 1; i >= 0; --i) { eset_insert(set, get_Sel_method(node, i)); @@ -393,7 +393,7 @@ static void free_mark(ir_node *node, eset * set) { } case iro_SymConst: if (get_SymConst_kind(node) == symconst_addr_ent) { - entity * ent = get_SymConst_entity(node); + ir_entity * ent = get_SymConst_entity(node); if (is_Method_type(get_entity_type(ent))) { eset_insert(set, ent); } @@ -480,7 +480,7 @@ static void free_ana_walker(ir_node *node, void *env) { * * which is sometimes used to anchor functions. */ -static void add_method_address(entity *ent, eset *set) +static void add_method_address(ir_entity *ent, eset *set) { ir_node *n; ir_type *tp; @@ -515,7 +515,7 @@ static void add_method_address(entity *ent, eset *set) /* let's check if it's the address of a function */ if (get_irn_op(n) == op_SymConst) { if (get_SymConst_kind(n) == symconst_addr_ent) { - entity *ent = get_SymConst_entity(n); + ir_entity *ent = get_SymConst_entity(n); if (is_Method_type(get_entity_type(ent))) eset_insert(set, ent); @@ -535,12 +535,12 @@ static void add_method_address(entity *ent, eset *set) * umgewandelt worden sein, d.h. SymConst-Operationen verweisen immer * auf eine echt externe Methode. */ -static entity ** get_free_methods(void) +static ir_entity ** get_free_methods(void) { eset *free_set = eset_create(); int i; - entity **arr = NEW_ARR_F(entity *, 0); - entity *ent; + ir_entity **arr = NEW_ARR_F(ir_entity *, 0); + ir_entity *ent; ir_graph *irg; ir_type *glob; @@ -580,7 +580,7 @@ static entity ** get_free_methods(void) /* Finally, transform the set into an array. */ for (ent = eset_first(free_set); ent; ent = eset_next(free_set)) { - ARR_APP1(entity *, arr, ent); + ARR_APP1(ir_entity *, arr, ent); } eset_destroy(free_set); @@ -658,7 +658,7 @@ static void callee_ana_node(ir_node *node, eset *methods) { break; case iro_SymConst: if (get_SymConst_kind(node) == symconst_addr_ent) { - entity *ent = get_SymConst_entity(node); + ir_entity *ent = get_SymConst_entity(node); assert(ent && is_Method_type(get_entity_type(ent))); eset_insert(methods, ent); } else { @@ -670,7 +670,7 @@ static void callee_ana_node(ir_node *node, eset *methods) { case iro_Sel: /* polymorphe Methode */ for (i = get_Sel_n_methods(node) - 1; i >= 0; --i) { - entity * ent = get_Sel_method(node, i); + ir_entity * ent = get_Sel_method(node, i); if (ent) { eset_insert(methods, ent); } else { @@ -731,16 +731,16 @@ static void callee_ana_node(ir_node *node, eset *methods) { static void callee_walker(ir_node * call, void * env) { if (is_Call(call)) { eset * methods = eset_create(); - entity * ent; - entity ** arr = NEW_ARR_F(entity *, 0); + ir_entity * ent; + ir_entity ** arr = NEW_ARR_F(ir_entity *, 0); assert(get_irn_op(get_Call_ptr(call)) != op_Id); callee_ana_node(get_Call_ptr(call), methods); if (eset_contains(methods, MARK)) { /* unknown method */ - ARR_APP1(entity *, arr, unknown_entity); + ARR_APP1(ir_entity *, arr, unknown_entity); } for (ent = eset_first(methods); ent; ent = eset_next(methods)) { if (ent != MARK) { - ARR_APP1(entity *, arr, ent); + ARR_APP1(ir_entity *, arr, ent); } } #if 0 /* This generates Bad nodes when we don't want it. @@ -802,10 +802,10 @@ static void callee_ana(void) { /** Frees intermediate data structures. */ static void sel_methods_dispose(void) { - entity * ent; + ir_entity * ent; assert(entities); for (ent = eset_first(entities); ent; ent = eset_next(entities)) { - entity ** arr = get_entity_link(ent); + ir_entity ** arr = get_entity_link(ent); if (arr) { DEL_ARR_F(arr); } @@ -829,8 +829,8 @@ static void destruct_walker(ir_node * node, void * env) { /* Main drivers. */ /*--------------------------------------------------------------------------*/ -void cgana(int *length, entity ***free_methods) { - entity ** free_meths, **p; +void cgana(int *length, ir_entity ***free_methods) { + ir_entity ** free_meths, **p; /* Optimize Sel/SymConst nodes and compute all methods that implement an entity. */ sel_methods_init(); diff --git a/ir/ana/cgana.h b/ir/ana/cgana.h index fcfbe0a1d..ea9829645 100644 --- a/ir/ana/cgana.h +++ b/ir/ana/cgana.h @@ -67,7 +67,7 @@ * * Leaves Bad control predecessors in the graph! */ -void cgana(int *len, entity ***free_methods); +void cgana(int *len, ir_entity ***free_methods); /** Free callee information. * diff --git a/ir/ana/field_temperature.c b/ir/ana/field_temperature.c index 160d9cc74..e062b5737 100644 --- a/ir/ana/field_temperature.c +++ b/ir/ana/field_temperature.c @@ -42,7 +42,7 @@ int get_Sel_n_accessed_entities(ir_node *sel) { return 1; } -entity *get_Sel_accessed_entity(ir_node *sel, int pos) { +ir_entity *get_Sel_accessed_entity(ir_node *sel, int pos) { return get_Sel_entity(sel); } @@ -141,7 +141,7 @@ int get_type_estimated_n_fields(ir_type *tp) { case tpo_struct: { int i, n_mem = get_compound_n_members(tp); for (i = 0; i < n_mem; ++i) { - entity *mem = get_compound_member(tp, i); + ir_entity *mem = get_compound_member(tp, i); if (get_entity_allocation(mem) == allocation_automatic) { s += get_type_estimated_n_fields(get_entity_type(mem)); } @@ -181,7 +181,7 @@ int get_type_estimated_size_bytes(ir_type *tp) { case tpo_struct: { int i, n_mem = get_compound_n_members(tp); for (i = 0; i < n_mem; ++i) { - entity *mem = get_compound_member(tp, i); + ir_entity *mem = get_compound_member(tp, i); s += get_type_estimated_size_bytes(get_entity_type(mem)); if (get_entity_allocation(mem) == allocation_automatic) { @@ -269,7 +269,7 @@ double get_class_estimated_dispatch_reads (ir_type *clss) { int i, n_mems = get_class_n_members(clss); double n_calls = 0; for (i = 0; i < n_mems; ++i) { - entity *mem = get_class_member(clss, i); + ir_entity *mem = get_class_member(clss, i); n_calls += get_entity_estimated_n_dyncalls(mem); } return n_calls; @@ -280,7 +280,7 @@ double get_class_estimated_n_dyncalls(ir_type *clss) { get_class_estimated_dispatch_writes(clss); } -double get_entity_estimated_n_loads(entity *ent) { +double get_entity_estimated_n_loads(ir_entity *ent) { int i, n_acc = get_entity_n_accesses(ent); double n_loads = 0; for (i = 0; i < n_acc; ++i) { @@ -292,7 +292,7 @@ double get_entity_estimated_n_loads(entity *ent) { return n_loads; } -double get_entity_estimated_n_stores(entity *ent) { +double get_entity_estimated_n_stores(ir_entity *ent) { int i, n_acc = get_entity_n_accesses(ent); double n_stores = 0; for (i = 0; i < n_acc; ++i) { @@ -304,7 +304,7 @@ double get_entity_estimated_n_stores(entity *ent) { } /* @@@ Should we evaluate the callee array? */ -double get_entity_estimated_n_calls(entity *ent) { +double get_entity_estimated_n_calls(ir_entity *ent) { int i, n_acc = get_entity_n_accesses(ent); double n_calls = 0; for (i = 0; i < n_acc; ++i) { @@ -316,7 +316,7 @@ double get_entity_estimated_n_calls(entity *ent) { return n_calls; } -double get_entity_estimated_n_dyncalls(entity *ent) { +double get_entity_estimated_n_dyncalls(ir_entity *ent) { int i, n_acc = get_entity_n_accesses(ent); double n_calls = 0; for (i = 0; i < n_acc; ++i) { @@ -328,7 +328,7 @@ double get_entity_estimated_n_dyncalls(entity *ent) { /* MemOp->Sel combination for static, overwritten entities */ } else if (is_memop(acc) && is_Sel(get_memop_ptr(acc))) { - entity *ent = get_Sel_entity(get_memop_ptr(acc)); + ir_entity *ent = get_Sel_entity(get_memop_ptr(acc)); if (is_Class_type(get_entity_owner(ent))) { /* We might call this for inner entities in compounds. */ if (get_entity_n_overwrites(ent) > 0 || @@ -370,7 +370,7 @@ int is_jack_rts_class(ir_type *t) { #include "entity_t.h" // for the assertion. -int is_jack_rts_entity(entity *e) { +int is_jack_rts_entity(ir_entity *e) { ident *name; assert(e->ld_name); diff --git a/ir/ana/field_temperature.h b/ir/ana/field_temperature.h index 50e990d87..43a130454 100644 --- a/ir/ana/field_temperature.h +++ b/ir/ana/field_temperature.h @@ -34,8 +34,8 @@ /** The entities that can be accessed by this Sel node. * -int get_Sel_n_accessed_entities(ir_node *sel); -entity *get_Sel_accessed_entity (ir_node *sel, int pos); +int get_Sel_n_accessed_entities(ir_node *sel); +ir_entity *get_Sel_accessed_entity (ir_node *sel, int pos); */ int get_irn_loop_call_depth(ir_node *n); @@ -84,12 +84,12 @@ double get_class_estimated_dispatch_writes(ir_type *clss); /** Returns the number of reads of the dispatch pointer. */ double get_class_estimated_dispatch_reads (ir_type *clss); -double get_entity_estimated_n_loads(entity *ent); -double get_entity_estimated_n_stores(entity *ent); -double get_entity_estimated_n_calls(entity *ent); +double get_entity_estimated_n_loads(ir_entity *ent); +double get_entity_estimated_n_stores(ir_entity *ent); +double get_entity_estimated_n_calls(ir_entity *ent); /** The number of accesses to dynamically called methods and * to other static fields that overwrite/are overwritten. */ -double get_entity_estimated_n_dyncalls(entity *ent); +double get_entity_estimated_n_dyncalls(ir_entity *ent); /* ------------------------------------------------------------------------- */ /* Accumulate information in the type hierarchy. */ @@ -103,6 +103,6 @@ typedef enum { /** An auxiliary/temporary function */ int is_jack_rts_class(ir_type *t); -int is_jack_rts_entity(entity *e); +int is_jack_rts_entity(ir_entity *e); #endif /* _FIELD_TEMPERATURE_H_ */ diff --git a/ir/ana/trouts.c b/ir/ana/trouts.c index f2eb85b0d..6ae8c8438 100644 --- a/ir/ana/trouts.c +++ b/ir/ana/trouts.c @@ -38,7 +38,7 @@ static pmap *type_arraytype_map = NULL; * Return a flexible array containing all IR-nodes * that access a given entity. */ -static ir_node **get_entity_access_array(entity *ent) { +static ir_node **get_entity_access_array(ir_entity *ent) { ir_node **res; if (!entity_access_map) entity_access_map = pmap_create(); @@ -51,7 +51,7 @@ static ir_node **get_entity_access_array(entity *ent) { return res; } -void set_entity_access_array(entity *ent, ir_node **accs) { +void set_entity_access_array(ir_entity *ent, ir_node **accs) { ir_node **old = pmap_get(entity_access_map, (void *)ent); if (old != accs) pmap_insert(entity_access_map, (void *)ent, (void *)accs); @@ -61,7 +61,7 @@ void set_entity_access_array(entity *ent, ir_node **accs) { * Return a flexible array containing all IR-nodes * that reference a given entity. */ -static ir_node **get_entity_reference_array(entity *ent) { +static ir_node **get_entity_reference_array(ir_entity *ent) { ir_node **res; if (!entity_reference_map) entity_reference_map = pmap_create(); @@ -74,7 +74,7 @@ static ir_node **get_entity_reference_array(entity *ent) { return res; } -void set_entity_reference_array(entity *ent, ir_node **refs) { +void set_entity_reference_array(ir_entity *ent, ir_node **refs) { ir_node **old = pmap_get(entity_reference_map, (void *)ent); if (old != refs) pmap_insert(entity_reference_map, (void *)ent, (void *)refs); @@ -183,7 +183,7 @@ void set_type_arraytype_array(ir_type *tp, ir_type **pts) { /* Access routines for entities */ /**------------------------------------------------------------------*/ -int get_entity_n_accesses(entity *ent) { +int get_entity_n_accesses(ir_entity *ent) { ir_node ** accs; assert(ent && is_entity(ent)); @@ -192,7 +192,7 @@ int get_entity_n_accesses(entity *ent) { return ARR_LEN(accs); } -ir_node *get_entity_access(entity *ent, int pos) { +ir_node *get_entity_access(ir_entity *ent, int pos) { ir_node ** accs; assert(0 <= pos && pos < get_entity_n_accesses(ent)); @@ -201,7 +201,7 @@ ir_node *get_entity_access(entity *ent, int pos) { return accs[pos]; } -void add_entity_access(entity *ent, ir_node *n) { +void add_entity_access(ir_entity *ent, ir_node *n) { ir_node ** accs; assert(ent && is_entity(ent)); @@ -212,7 +212,7 @@ void add_entity_access(entity *ent, ir_node *n) { set_entity_access_array(ent, accs); } -void set_entity_access(entity *ent, int pos, ir_node *n) { +void set_entity_access(ir_entity *ent, int pos, ir_node *n) { ir_node ** accs; assert(0 <= pos && pos < get_entity_n_accesses(ent)); @@ -224,7 +224,7 @@ void set_entity_access(entity *ent, int pos, ir_node *n) { /**------------------------------------------------------------------*/ -int get_entity_n_references(entity *ent) { +int get_entity_n_references(ir_entity *ent) { ir_node ** refs; assert(ent && is_entity(ent)); @@ -233,7 +233,7 @@ int get_entity_n_references(entity *ent) { return ARR_LEN(refs); } -ir_node *get_entity_reference(entity *ent, int pos) { +ir_node *get_entity_reference(ir_entity *ent, int pos) { ir_node ** refs; assert(0 <= pos && pos < get_entity_n_references(ent)); @@ -242,7 +242,7 @@ ir_node *get_entity_reference(entity *ent, int pos) { return refs[pos]; } -void add_entity_reference(entity *ent, ir_node *n) { +void add_entity_reference(ir_entity *ent, ir_node *n) { ir_node ** refs; assert(ent && is_entity(ent)); @@ -253,7 +253,7 @@ void add_entity_reference(entity *ent, ir_node *n) { set_entity_reference_array(ent, refs); } -void set_entity_reference(entity *ent, int pos, ir_node *n) { +void set_entity_reference(ir_entity *ent, int pos, ir_node *n) { ir_node ** refs; assert(0 <= pos && pos < get_entity_n_references(ent)); @@ -467,7 +467,7 @@ static int get_Sel_n_accessed_entities(ir_node *sel) { } /** The entity that cat be accessed by this Sel node. */ -static entity *get_Sel_accessed_entity(ir_node *sel) { +static ir_entity *get_Sel_accessed_entity(ir_node *sel) { return get_Sel_entity(sel); } @@ -495,8 +495,8 @@ static int get_addr_n_entities(ir_node *addr) { /** An addr node is a SymConst or a Sel. If Sel follow to outermost of compound. */ -static entity *get_addr_entity(ir_node *addr, int pos) { - entity *ent; +static ir_entity *get_addr_entity(ir_node *addr, int pos) { + ir_entity *ent; switch (get_irn_opcode(addr)) { case iro_Sel: @@ -553,7 +553,7 @@ static void chain_accesses(ir_node *n, void *env) { n_ents = get_addr_n_entities(addr); /* == 1 */ for (i = 0; i < n_ents; ++i) { - entity *ent = get_addr_entity(addr, i); + ir_entity *ent = get_addr_entity(addr, i); if (ent) add_entity_access(ent, n); //else diff --git a/ir/ana/trouts.h b/ir/ana/trouts.h index 8556b2d54..59033076c 100644 --- a/ir/ana/trouts.h +++ b/ir/ana/trouts.h @@ -45,16 +45,16 @@ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /** Number of Load/Store nodes that possibly access this entity. */ -int get_entity_n_accesses(entity *ent); +int get_entity_n_accesses(ir_entity *ent); /** Load/Store node that possibly access this entity. */ -ir_node *get_entity_access(entity *ent, int pos); +ir_node *get_entity_access(ir_entity *ent, int pos); /** Number of references to an entity, in form of SymConst/Sel. * Including references from constant entities and the like. */ -int get_entity_n_references(entity *ent); +int get_entity_n_references(ir_entity *ent); /** References to an entity, in form of SymConst/Sel * Including references from constants. */ -ir_node *get_entity_reference(entity *ent, int pos); +ir_node *get_entity_reference(ir_entity *ent, int pos); /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* types */ diff --git a/ir/ana2/ecg.c b/ir/ana2/ecg.c index 7195428b0..c75afc5a1 100644 --- a/ir/ana2/ecg.c +++ b/ir/ana2/ecg.c @@ -78,7 +78,7 @@ static int _depth = 0; static int _max_depth = 0; static int _max_callEds = 0; -static entity* _max_callEds_callR = NULL; +static ir_entity* _max_callEds_callR = NULL; /* Protos */ void set_main_ctx (ctx_info_t*); @@ -168,7 +168,7 @@ static void append_call (graph_info_t *info, ir_node *call, ir_graph *callEd) Given a method, find the firm graph that implements that method. Return NULL for abstract and native methods. */ -static ir_graph *_get_implementing_graph (entity *method) +static ir_graph *_get_implementing_graph (ir_entity *method) { ir_graph *graph = NULL; @@ -199,7 +199,7 @@ static ir_graph *_get_implementing_graph (entity *method) assert (!graph); for (i = 0; (NULL == graph) && (i < n_over); i ++) { - entity *over = get_entity_overwrites (method, i); + ir_entity *over = get_entity_overwrites (method, i); graph = _get_implementing_graph (over); } @@ -214,7 +214,7 @@ static ir_graph *_get_implementing_graph (entity *method) /** Collect all graphs of 'method' in the given set. */ -static void _collect_implementing_graphs (entity *method, lset_t *set) +static void _collect_implementing_graphs (ir_entity *method, lset_t *set) { /* search DOWN-wards in clazz hierarchy */ int i; @@ -230,7 +230,7 @@ static void _collect_implementing_graphs (entity *method, lset_t *set) } for (i = 0; i < n_over; i ++) { - entity *over = get_entity_overwrittenby (method, i); + ir_entity *over = get_entity_overwrittenby (method, i); _collect_implementing_graphs (over, set); } @@ -240,7 +240,7 @@ static void _collect_implementing_graphs (entity *method, lset_t *set) /** Collect all graphs that could possibly be executed when 'method' is called. */ -static lset_t *get_implementing_graphs (entity *method, ir_node *select) +static lset_t *get_implementing_graphs (ir_entity *method, ir_node *select) { /* const char *name = get_entity_name (method); */ /* fprintf (stdout, "%s (ent %s)\n", __FUNCTION__, name); */ @@ -373,7 +373,7 @@ static void ecg_calls_act (ir_node *node, void *env) graph_info_t *graph_info = (graph_info_t*) env; if (op_Call == op) { /* CALL */ - entity *ent = NULL; + ir_entity *ent = NULL; ir_node *ptr = get_Call_ptr (node); if (!call_is_call (node, ptr)) { @@ -616,7 +616,7 @@ static void ecg_fill_ctxs (void) */ void ecg_print_ctx (ctx_info_t *ctx, FILE *stream) { - entity *ent = get_irg_entity(ctx->graph); + ir_entity *ent = get_irg_entity(ctx->graph); ir_node *call = ctx->call; const char *ent_name = get_entity_name (ent); const char *own_name = get_type_name (get_entity_owner (ent)); @@ -1267,6 +1267,9 @@ void ecg_ecg (void) /* $Log$ + Revision 1.23 2006/12/13 19:46:47 beck + rename type entity into ir_entity + Revision 1.22 2006/01/13 22:55:03 beck renamed all types 'type' to 'ir_type' diff --git a/ir/ana2/pto_comp.c b/ir/ana2/pto_comp.c index 94487cd44..e923966a5 100644 --- a/ir/ana2/pto_comp.c +++ b/ir/ana2/pto_comp.c @@ -360,7 +360,7 @@ static pto_t *get_pto (ir_node *node, pto_env_t *env) static void pto_load (ir_node *load, pto_env_t *pto_env) { ir_node *ptr; - entity *ent; + ir_entity *ent; /* perform load */ DBGPRINT (2, (stdout, "%s (%s[%li]): pto = 0x%08x\n", @@ -391,7 +391,7 @@ static void pto_load (ir_node *load, pto_env_t *pto_env) static void pto_store (ir_node *store, pto_env_t *pto_env) { ir_node *ptr, *val; - entity *ent; + ir_entity *ent; pto_t *ptr_pto, *val_pto; /* perform store */ @@ -542,7 +542,7 @@ static void pto_call (ir_graph *graph, ir_node *call, pto_env_t *pto_env) int change = FALSE; /* only for debugging stuff: */ - entity *ent = get_irg_entity (graph); + ir_entity *ent = get_irg_entity (graph); const char *ent_name = (char*) get_entity_name (ent); const char *own_name = (char*) get_type_name (get_entity_owner (ent)); @@ -756,6 +756,9 @@ pto_t *get_alloc_pto (ir_node *alloc) /* $Log$ + Revision 1.19 2006/12/13 19:46:47 beck + rename type entity into ir_entity + Revision 1.18 2006/01/13 22:57:41 beck renamed all types 'type' to 'ir_type' used mode_is_reference instead of != mode_P test diff --git a/ir/ana2/pto_init.c b/ir/ana2/pto_init.c index 898d88d62..976509cf5 100644 --- a/ir/ana2/pto_init.c +++ b/ir/ana2/pto_init.c @@ -103,7 +103,7 @@ static alloc_pto_t *new_alloc_pto (ir_node *alloc, int n_ctxs) static pto_t* new_symconst_pto (ir_node *symconst) { pto_t *pto; - entity *ent; + ir_entity *ent; desc_t *desc = NULL; assert (op_SymConst == get_irn_op(symconst)); @@ -154,7 +154,7 @@ static void clear_type_link (type_or_ent *thing, void *_unused) set_type_link (tp, NULL); } } else if (is_entity (thing)) { - entity *ent = (entity*) thing; + ir_entity *ent = (ir_entity*) thing; DBGPRINT (1, (stdout, "%s (\"%s\")\n", __FUNCTION__, @@ -237,7 +237,7 @@ static void init_pto (ir_node *node, void *env) switch (op) { case (iro_SymConst): { if (mode_is_reference (get_irn_mode (node))) { - entity *ent = get_SymConst_entity (node); + ir_entity *ent = get_SymConst_entity (node); ir_type *tp = get_entity_type (ent); if (is_Class_type (tp) || is_Pointer_type (tp)) { pto_t *symconst_pto = new_symconst_pto (node); @@ -317,7 +317,7 @@ void fake_main_args (ir_graph *graph) { /* HERE ("start"); */ - entity *ent = get_irg_entity (graph); + ir_entity *ent = get_irg_entity (graph); ir_type *mtp = get_entity_type (ent); ir_node **args = find_irg_args (graph); ir_type *ctp = get_method_param_type (mtp, 1); /* ctp == char[]*[]* */ @@ -395,7 +395,7 @@ void pto_init_graph (ir_graph *graph) const int n_ctxs = ginfo->n_ctxs; /* only for debugging stuff: */ - entity *ent = get_irg_entity (graph); + ir_entity *ent = get_irg_entity (graph); const char *ent_name = (char*) get_entity_name (ent); const char *own_name = (char*) get_type_name (get_entity_owner (ent)); @@ -436,6 +436,9 @@ void pto_reset_graph_pto (ir_graph *graph, int ctx_idx) /* $Log$ + Revision 1.22 2006/12/13 19:46:47 beck + rename type entity into ir_entity + Revision 1.21 2006/06/08 10:49:07 beck renamed type to ir_type diff --git a/ir/ana2/pto_mod.c b/ir/ana2/pto_mod.c index 8640b1b66..0e8d0c4db 100644 --- a/ir/ana2/pto_mod.c +++ b/ir/ana2/pto_mod.c @@ -44,7 +44,7 @@ Exported Implementation: =================================================== */ /* Perform the given store; return nonzero iff any involved values change */ -int mod_store (ir_node *store, entity *ent, +int mod_store (ir_node *store, ir_entity *ent, pto_t *ptr_pto, pto_t *val_pto) { int change = 0; @@ -67,7 +67,7 @@ int mod_store (ir_node *store, entity *ent, } /* Perform the given load; return nonzero iff any involved values change */ -int mod_load (ir_node *load, entity *ent, +int mod_load (ir_node *load, ir_entity *ent, pto_t *ptr_pto) { int change = 0; @@ -92,6 +92,9 @@ int mod_load (ir_node *load, entity *ent, /* $Log$ + Revision 1.3 2006/12/13 19:46:47 beck + rename type entity into ir_entity + Revision 1.2 2004/12/02 16:17:51 beck fixed config.h include diff --git a/ir/ana2/pto_mod.h b/ir/ana2/pto_mod.h index 77b1eb560..25d6d9187 100644 --- a/ir/ana2/pto_mod.h +++ b/ir/ana2/pto_mod.h @@ -13,12 +13,12 @@ */ -# ifndef _PTO_MOD_ -# define _PTO_MOD_ +#ifndef _PTO_MOD_ +#define _PTO_MOD_ -# include "irnode.h" -# include "entity.h" -# include "pto_comp.h" +#include "irnode.h" +#include "entity.h" +#include "pto_comp.h" /* =================================================== Global Defines: @@ -32,22 +32,25 @@ Global Prototypes: =================================================== */ /* Perform the given store; return nonzero iff any involved values change */ -int mod_store (ir_node*, entity*, pto_t*, pto_t*); +int mod_store (ir_node*, ir_entity*, pto_t*, pto_t*); /* Perform the given load; return nonzero iff any involved values change */ -int mod_load (ir_node*, entity*, pto_t*); +int mod_load (ir_node*, ir_entity*, pto_t*); /* =================================================== Global Variables: =================================================== */ -# endif /* not defined _PTO_MOD_ */ +#endif /* not defined _PTO_MOD_ */ /* $Log$ + Revision 1.2 2006/12/13 19:46:47 beck + rename type entity into ir_entity + Revision 1.1 2004/11/30 14:47:54 liekweg fix initialisation; do correct iteration diff --git a/ir/ana2/pto_name.c b/ir/ana2/pto_name.c index 50cfec7fb..e0b1f4dfe 100644 --- a/ir/ana2/pto_name.c +++ b/ir/ana2/pto_name.c @@ -200,7 +200,7 @@ static void pto_name_alloc_colors (void) # endif /* defined PTO_COLOR */ /* See whether the given entity is a field. */ -static int is_field (entity *ent) +static int is_field (ir_entity *ent) { ir_type *tp = get_entity_type (ent); @@ -221,7 +221,7 @@ static void _collect_fields (ir_type *clazz, struct obstack *obst) int i; for (i = 0; i < n_members; i ++) { - entity *ent = get_class_member (clazz, i); + ir_entity *ent = get_class_member (clazz, i); if (is_field (ent)) { if (allocation_static != get_entity_allocation (ent)) { @@ -239,11 +239,11 @@ static void _collect_fields (ir_type *clazz, struct obstack *obst) /* Collect the fields of the given class and its super classes into an array. The last entry of the array is written NULL. */ -static entity **collect_fields (ir_type *clazz) +static ir_entity **collect_fields (ir_type *clazz) { struct obstack obst; int n_fields; - entity ** fields; + ir_entity ** fields; void *tmp; if (NULL != get_type_link (clazz)) { @@ -251,7 +251,7 @@ static entity **collect_fields (ir_type *clazz) __FUNCTION__, get_type_name (clazz))); - return ((entity **) get_type_link (clazz)); + return ((ir_entity **) get_type_link (clazz)); } else { DBGPRINT (2, (stdout, "%s: new field list for \"%s\"\n", __FUNCTION__, @@ -267,10 +267,10 @@ static entity **collect_fields (ir_type *clazz) n_fields = obstack_object_size (&obst) / sizeof (void*); - fields = NALLOC (n_fields * sizeof (entity*)); + fields = NALLOC (n_fields * sizeof (ir_entity*)); tmp = obstack_finish(&obst); - memcpy (fields, tmp, n_fields * sizeof (entity*)); + memcpy (fields, tmp, n_fields * sizeof (ir_entity*)); obstack_free (&obst, NULL); @@ -326,7 +326,7 @@ static void pto_name_dump_desc (desc_t *desc, FILE *stream) if (NULL != nd) { ir_graph *graph = get_irn_irg (nd); - entity *method = get_irg_entity (graph); + ir_entity *method = get_irg_entity (graph); const char *ent_name = get_entity_name (method); const char *own_name = get_type_name (get_entity_owner (method)); @@ -343,7 +343,7 @@ static void pto_name_dump_desc (desc_t *desc, FILE *stream) int i; for (i = 0; i < obj_desc->n_fields; i ++) { - entity *field = obj_desc->fields [i]; + ir_entity *field = obj_desc->fields [i]; if (is_Pointer_type (get_entity_type (field))) { const char *ent_name = get_entity_name (field); @@ -446,7 +446,7 @@ static void pto_name_dump_desc (desc_t *desc, FILE *stream) Exported Implementation: =================================================== */ /* Find the given descriptor's entry for the given entity */ -qset_t *get_entry (desc_t *desc, entity *ent) +qset_t *get_entry (desc_t *desc, ir_entity *ent) { if (desc->kind == object) { @@ -531,7 +531,7 @@ static obj_desc_t *obj_glob = NULL; static int n_glob_fields = N_GLOB_INITIAL_FIELDS; /* get a new descriptor for the given (presumably static) entity */ -desc_t *new_ent_name (entity *ent) +desc_t *new_ent_name (ir_entity *ent) { int i; int missing = TRUE; @@ -562,7 +562,7 @@ desc_t *new_ent_name (entity *ent) obj_glob->node = NULL; obj_glob->n_fields = 0; - obj_glob->fields = (entity**) NALLOC (N_GLOB_INITIAL_FIELDS * sizeof (entity*)); + obj_glob->fields = (ir_entity**) NALLOC (N_GLOB_INITIAL_FIELDS * sizeof (ir_entity*)); obj_glob->values = (qset_t**) NALLOC (N_GLOB_INITIAL_FIELDS * sizeof (qset_t*)); obj_glob->prev = all_descs; @@ -577,14 +577,14 @@ desc_t *new_ent_name (entity *ent) if (missing) { if (obj_glob->n_fields == n_glob_fields) { - entity **fields = obj_glob->fields; + ir_entity **fields = obj_glob->fields; qset_t **values = obj_glob->values; n_glob_fields *= 2; - obj_glob->fields = (entity**) NALLOC (n_glob_fields * sizeof (entity*)); + obj_glob->fields = (ir_entity**) NALLOC (n_glob_fields * sizeof (ir_entity*)); obj_glob->values = (qset_t**) NALLOC (n_glob_fields * sizeof (qset_t*)); - memcpy (obj_glob->fields, fields, obj_glob->n_fields * sizeof (entity*)); + memcpy (obj_glob->fields, fields, obj_glob->n_fields * sizeof (ir_entity*)); memcpy (obj_glob->values, values, obj_glob->n_fields * sizeof (qset_t*)); /* free (fields); */ @@ -658,6 +658,9 @@ void pto_name_cleanup (void) /* $Log$ + Revision 1.19 2006/12/13 19:46:47 beck + rename type entity into ir_entity + Revision 1.18 2006/01/13 22:56:21 beck renamed all types 'type' to 'ir_type' diff --git a/ir/ana2/pto_name.h b/ir/ana2/pto_name.h index 09191c924..a3f0342f1 100644 --- a/ir/ana2/pto_name.h +++ b/ir/ana2/pto_name.h @@ -60,7 +60,7 @@ typedef struct obj_desc_str struct desc_str *prev; /* linked list */ int n_fields; - entity **fields; + ir_entity **fields; qset_t **values; } obj_desc_t; @@ -86,13 +86,13 @@ typedef struct arr_desc_str void pto_dump_names (const char*); /* Find the given descriptor's entry for the given entity */ -qset_t *get_entry (desc_t*, entity*); +qset_t *get_entry (desc_t*, ir_entity*); /* get a new descriptor for the given type at the given node */ desc_t *new_name (ir_type*, ir_node*, int); /* get a new descriptor for the given (presumably static) entity */ -desc_t *new_ent_name (entity*); +desc_t *new_ent_name (ir_entity*); /* Initialise the name module */ void pto_name_init (void); @@ -111,6 +111,9 @@ void pto_name_cleanup (void); /* $Log$ + Revision 1.8 2006/12/13 19:46:47 beck + rename type entity into ir_entity + Revision 1.7 2006/01/13 22:00:15 beck renamed all types 'type' to 'ir_type' diff --git a/ir/ana2/pto_util.c b/ir/ana2/pto_util.c index 9818f77a6..5ab412301 100644 --- a/ir/ana2/pto_util.c +++ b/ir/ana2/pto_util.c @@ -103,9 +103,9 @@ ir_node **find_irg_args (ir_graph *graph) } /* Get the entity of a ptr */ -entity *get_ptr_ent (ir_node *ptr) +ir_entity *get_ptr_ent (ir_node *ptr) { - entity *ent = NULL; + ir_entity *ent = NULL; const opcode ptr_op = get_irn_opcode (ptr); switch (ptr_op) { case (iro_Cast): { @@ -154,6 +154,9 @@ int is_dummy_load_ptr (ir_node *ptr) /* $Log$ + Revision 1.18 2006/12/13 19:46:47 beck + rename type entity into ir_entity + Revision 1.17 2006/06/08 10:49:07 beck renamed type to ir_type diff --git a/ir/ana2/pto_util.h b/ir/ana2/pto_util.h index 341642353..bc4a584a1 100644 --- a/ir/ana2/pto_util.h +++ b/ir/ana2/pto_util.h @@ -31,7 +31,7 @@ Global Prototypes: =================================================== */ /** Get the entity of a ptr. */ -entity *get_ptr_ent (ir_node *ptr); +ir_entity *get_ptr_ent (ir_node *ptr); /** * Find the arguments of a graph. For a method that has n args, the @@ -55,6 +55,9 @@ int is_dummy_load_ptr (ir_node*); /* $Log$ + Revision 1.8 2006/12/13 19:46:47 beck + rename type entity into ir_entity + Revision 1.7 2005/06/17 17:43:52 beck added doxygen docu diff --git a/ir/ana2/typalise.c b/ir/ana2/typalise.c index f5a8aa4aa..55e16a60a 100644 --- a/ir/ana2/typalise.c +++ b/ir/ana2/typalise.c @@ -195,7 +195,7 @@ static lset_t *subtype_closure (ir_type *otype) /** Helper method for get_owner_types */ -static void _collect_owner_types (entity *method, ir_graph *graph, lset_t *tps) +static void _collect_owner_types (ir_entity *method, ir_graph *graph, lset_t *tps) { int i, n_over; @@ -218,7 +218,7 @@ static void _collect_owner_types (entity *method, ir_graph *graph, lset_t *tps) n_over = get_entity_n_overwrittenby (method); for (i = 0; i < n_over; i ++) { - entity *ometh = get_entity_overwrittenby (method, i); + ir_entity *ometh = get_entity_overwrittenby (method, i); _collect_owner_types (ometh, graph, tps); } @@ -231,7 +231,7 @@ static void _collect_owner_types (entity *method, ir_graph *graph, lset_t *tps) static lset_t *get_owner_types (ir_graph *graph) { lset_t *tps = lset_create (); - entity *meth = get_irg_entity (graph); + ir_entity *meth = get_irg_entity (graph); _collect_owner_types (meth, graph, tps); @@ -423,7 +423,7 @@ static const char *ta_name (typalise_t *ta) method. Presumably, this is because clazz inherits the graph as the implementation for a method. */ -static int uses_graph (ir_type *clazz, entity *meth, ir_graph *graph) +static int uses_graph (ir_type *clazz, ir_entity *meth, ir_graph *graph) { ir_type *g_clazz = get_entity_owner (meth); int i, n_over, use = FALSE; @@ -443,7 +443,7 @@ static int uses_graph (ir_type *clazz, entity *meth, ir_graph *graph) /* else inherited or description */ n_over = get_entity_n_overwrittenby (meth); /* DOWN-wards */ for (i = 0; (i < n_over) && (!use); i ++) { - entity *over = get_entity_overwrittenby (meth, i); + ir_entity *over = get_entity_overwrittenby (meth, i); use |= uses_graph (clazz, over, graph); } @@ -471,7 +471,7 @@ static int ta_supports (typalise_t *ta, ir_graph *graph) return (res); } case (type_type): { - entity *meth = get_irg_entity (graph); + ir_entity *meth = get_irg_entity (graph); ir_type *tp = get_entity_owner (meth); int res = is_subtype (tp, ta->res.type); @@ -505,7 +505,7 @@ static int ta_supports (typalise_t *ta, ir_graph *graph) */ static typalise_t *typalise_call (ir_node *call) { - entity *ent = NULL; + ir_entity *ent = NULL; ir_type *tp = NULL; typalise_t *res = NULL; ir_node *call_ptr = get_Call_ptr (call); @@ -560,7 +560,7 @@ static typalise_t *typalise_call (ir_node *call) */ static typalise_t *typalise_load (ir_node *load) { - entity *ent = NULL; + ir_entity *ent = NULL; ir_type *tp = NULL; typalise_t *res = NULL; ir_node *load_ptr = get_Load_ptr (load); @@ -610,8 +610,8 @@ static typalise_t *typalise_proj (ir_node *proj) proj_in = get_Proj_pred (proj_in); if (iro_Start == get_irn_opcode (proj_in)) { /* aha, proj arg */ - ir_graph *graph = get_irn_irg (proj); - entity *meth = get_irg_entity (graph); + ir_graph *graph = get_irn_irg (proj); + ir_entity *meth = get_irg_entity (graph); long n = get_Proj_proj (proj); ir_type *tp = get_method_param_type (get_entity_type (meth), n); @@ -723,7 +723,7 @@ typalise_t *typalise (ir_node *node) case (iro_Sel): { /* FILTER */ /* it's call (sel (ptr)) or load (sel (ptr)) */ - entity *ent = get_Sel_entity (node); + ir_entity *ent = get_Sel_entity (node); ir_type *tp = get_entity_type (ent); if (is_Method_type (tp)) { @@ -781,7 +781,7 @@ typalise_t *typalise (ir_node *node) case (iro_Call): { /* presumably call (sel (proj (call))) */ ir_node *ptr = get_Call_ptr (node); - entity *meth = NULL; + ir_entity *meth = NULL; if (iro_Sel == get_irn_opcode (ptr)) { meth = get_Sel_entity (ptr); } else if (iro_SymConst == get_irn_opcode (ptr)) { @@ -811,7 +811,7 @@ typalise_t *typalise (ir_node *node) res = ta_type (tp); } else if (get_SymConst_kind (node) == symconst_addr_ent) { - entity *ent = get_SymConst_entity (node); + ir_entity *ent = get_SymConst_entity (node); ir_type *tp = get_entity_owner (ent); while (is_Pointer_type (tp)) { @@ -874,6 +874,9 @@ void typalise_init (void) /* $Log$ + Revision 1.13 2006/12/13 19:46:47 beck + rename type entity into ir_entity + Revision 1.12 2006/01/13 21:54:02 beck renamed all types 'type' to 'ir_type' diff --git a/ir/common/firmwalk.c b/ir/common/firmwalk.c index 36cf5b059..fd52704cb 100644 --- a/ir/common/firmwalk.c +++ b/ir/common/firmwalk.c @@ -219,11 +219,11 @@ static void fw_collect_tore(type_or_ent *tore, void *env) { ir_type *tp; - entity *ent; + ir_entity *ent; switch (get_kind(tore)) { case k_entity: - ent = (entity *)tore; + ent = (ir_entity *)tore; /* append entity to list */ set_entity_link(ent, NULL); if (!pmap_contains(entity_map, ent)) @@ -384,7 +384,7 @@ void firm_walk(firm_walk_interface *wif) if (wif->do_entity) { for (entry = pmap_first(entity_map); entry; entry = pmap_next(entity_map)) - wif->do_entity((entity *)entry->key, wif->env); + wif->do_entity((ir_entity *)entry->key, wif->env); } if (wif->do_entity_finalize) wif->do_entity_finalize(wif->env); diff --git a/ir/common/firmwalk.h b/ir/common/firmwalk.h index 6fce4eb74..56b41ff38 100644 --- a/ir/common/firmwalk.h +++ b/ir/common/firmwalk.h @@ -79,7 +79,7 @@ typedef void firm_walk_mode_func(ir_mode *mode, void *env); /** Type callback function definition */ typedef void firm_walk_type_func(ir_type *tp, void *env); /** Entity callback function definition */ -typedef void firm_walk_entity_func(entity *ent, void *env); +typedef void firm_walk_entity_func(ir_entity *ent, void *env); /** Graph callback function definition */ typedef void firm_walk_graph_func(ir_graph *irg, void *env); /* @{ */