Commit d0d85962 authored by Michael Beck's avatar Michael Beck
Browse files

rename type entity into ir_entity

[r8452]
parent 05c0043f
......@@ -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)
......
......@@ -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.
......
......@@ -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. */
......
......@@ -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 fr 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();
......
......@@ -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.
*
......
......@@ -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);
......
......@@ -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_ */
......@@ -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
......
......@@ -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 */
......
......@@ -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)
{