Commit 75bba342 authored by Michael Beck's avatar Michael Beck
Browse files

rename type entity into ir_entity

[r8454]
parent 8cb2d3a2
......@@ -89,7 +89,7 @@ static int firm_emit_dbg(lc_appendable_t *app,
/**
* Beware: do not set the entity ld_name
*/
static const char *get_entity_ld_name_ex(entity *ent) {
static const char *get_entity_ld_name_ex(ir_entity *ent) {
if (ent->ld_name)
return get_entity_ld_name(ent);
return get_entity_name(ent);
......@@ -110,7 +110,7 @@ static int firm_emit(lc_appendable_t *app,
char add[64];
char buf[256];
char tv_buf[256];
entity *ent;
ir_entity *ent;
buf[0] = '\0';
add[0] = '\0';
......
......@@ -68,7 +68,7 @@ static irg_data_t * irg_data_create(void) {
* - are external visible
* - are dereferenced somewhere within the program (i.e., the address of the
* method is stored somewhere). */
static void caller_init(int arr_length, entity ** free_methods) {
static void caller_init(int arr_length, ir_entity ** free_methods) {
int i, j;
for (i = get_irp_n_irgs() - 1; i >= 0; --i) {
set_entity_link(get_irg_entity(get_irp_irg(i)), irg_data_create());
......@@ -84,7 +84,7 @@ static void caller_init(int arr_length, entity ** free_methods) {
for (call = get_irn_link(get_irg_end(irg)); call; call = get_irn_link(call)) {
if (get_irn_op(call) != op_Call) continue;
for (j = get_Call_n_callees(call) - 1; j >= 0; --j) {
entity * ent = get_Call_callee(call, j);
ir_entity * ent = get_Call_callee(call, j);
if (get_entity_irg(ent)) {
irg_data_t * data = get_entity_link(ent);
# ifndef CATE_jni
......@@ -397,7 +397,7 @@ static void prepare_irg_end_except(ir_graph * irg, irg_data_t * data) {
/* Zwischengespeicherte Daten wieder freigeben. */
static void cleanup_irg(ir_graph * irg) {
entity * ent = get_irg_entity(irg);
ir_entity * ent = get_irg_entity(irg);
irg_data_t * data = get_entity_link(ent);
assert(data);
if (data->res) DEL_ARR_F(data->res);
......@@ -447,7 +447,7 @@ static void move_nodes(ir_node * from_block, ir_node * to_block, ir_node * node)
/* Abhngigkeiten vom Start-Block und den Filter-Operationen im
* Start-Block auf den Aufrufer hinzufgen. */
static void construct_start(entity * caller, entity * callee,
static void construct_start(ir_entity * caller, ir_entity * callee,
ir_node * call, ir_node * exec) {
irg_data_t *data = get_entity_link(callee);
ir_graph *irg = get_entity_irg(callee);
......@@ -594,8 +594,8 @@ static void construct_call(ir_node * call) {
int i, n_callees;
ir_node *post_block, *pre_block, *except_block, * proj, *jmp, *call_begin;
ir_node ** in;
entity * caller;
entity ** callees;
ir_entity * caller;
ir_entity ** callees;
ir_graph ** irgs;
irg_data_t ** data;
......@@ -611,7 +611,7 @@ static void construct_call(ir_node * call) {
in = NEW_ARR_F(ir_node *, n_callees);
caller = get_irg_entity(current_ir_graph); /* entity des aktuellen ir_graph */
callees = NEW_ARR_F(entity *, n_callees); /* aufgerufene Methoden: entity */
callees = NEW_ARR_F(ir_entity *, n_callees); /* aufgerufene Methoden: entity */
irgs = NEW_ARR_F(ir_graph *, n_callees); /* aufgerufene Methoden: ir_graph */
data = NEW_ARR_F(irg_data_t *, n_callees); /* aufgerufene Methoden: irg_data_t */
......@@ -695,7 +695,7 @@ static void construct_call(ir_node * call) {
set_interprocedural_view(1);
for (i = 0; i < n_callees; ++i) {
entity * callee = get_Call_callee(call, i);
ir_entity * callee = get_Call_callee(call, i);
if (data[i]) { /* explicit */
if (data[i]->except) {
in[i] = new_r_Proj(get_entity_irg(callee), get_nodes_block(data[i]->except),
......@@ -798,7 +798,7 @@ static void construct_call(ir_node * call) {
}
void cg_construct(int arr_len, entity ** free_methods_arr) {
void cg_construct(int arr_len, ir_entity ** free_methods_arr) {
int i;
if (get_irp_ip_view_state() == ip_view_valid) return;
......@@ -813,7 +813,7 @@ void cg_construct(int arr_len, entity ** free_methods_arr) {
/* prepare irgs */
for (i = get_irp_n_irgs() - 1; i >= 0; --i) {
ir_graph * irg = get_irp_irg(i);
entity * ent = get_irg_entity(irg);
ir_entity * ent = get_irg_entity(irg);
irg_data_t * data = get_entity_link(ent);
if (data->count) {
prepare_irg(irg, data);
......
......@@ -42,7 +42,7 @@ void set_irp_ip_view_invalid(void);
* are external visible. These methods get an 'Unknown'
* caller.
* @arg arr_len The number of free methods. */
void cg_construct(int arr_len, entity *free_methods_arr[]);
void cg_construct(int arr_len, ir_entity *free_methods_arr[]);
/** Deconstruction of the interprocedural view. Reduces memory consumption of
......
......@@ -44,12 +44,12 @@ static void collect_call(ir_node * node, void *env) {
static void make_entity_to_description(type_or_ent *tore, void *env) {
if (get_kind(tore) == k_entity) {
entity *ent = (entity *)tore;
ir_entity *ent = (ir_entity *)tore;
if ((is_Method_type(get_entity_type(ent))) &&
(get_entity_peculiarity(ent) != peculiarity_description) &&
(get_entity_visibility(ent) != visibility_external_allocated) ) {
entity *impl = get_SymConst_entity(get_atomic_ent_value(ent));
ir_entity *impl = get_SymConst_entity(get_atomic_ent_value(ent));
if (get_entity_link(impl) != env) {
set_entity_peculiarity(ent, peculiarity_description);
}
......@@ -58,7 +58,7 @@ static void make_entity_to_description(type_or_ent *tore, void *env) {
}
/* garbage collect methods: mark and remove */
void gc_irgs(int n_keep, entity ** keep_arr) {
void gc_irgs(int n_keep, ir_entity ** keep_arr) {
void * MARK = &MARK; /* @@@ gefaehrlich!!! Aber wir markieren hoechstens zu viele ... */
int i;
......@@ -71,7 +71,7 @@ void gc_irgs(int n_keep, entity ** keep_arr) {
/* Mark entities that are alive. */
if (n_keep > 0) {
entity ** marked = NEW_ARR_F(entity *, n_keep);
ir_entity ** marked = NEW_ARR_F(ir_entity *, n_keep);
for (i = 0; i < n_keep; ++i) {
marked[i] = keep_arr[i];
set_entity_link(marked[i], MARK);
......@@ -95,11 +95,11 @@ void gc_irgs(int n_keep, entity ** keep_arr) {
assert(get_irn_op(node) == op_Call);
for (i = get_Call_n_callees(node) - 1; i >= 0; --i) {
entity * ent = get_Call_callee(node, i);
ir_entity * ent = get_Call_callee(node, i);
if (get_entity_irg(ent) && get_entity_link(ent) != MARK) {
set_entity_link(ent, MARK);
ARR_APP1(entity *, marked, ent);
ARR_APP1(ir_entity *, marked, ent);
if (get_opt_dead_method_elimination_verbose() && get_firm_verbosity() > 2) {
printf("dead method elimination: method %s can be called from Call %ld: kept alive.\n",
get_entity_ld_name(ent), get_irn_node_nr(node));
......@@ -116,7 +116,7 @@ void gc_irgs(int n_keep, entity ** keep_arr) {
type_walk(make_entity_to_description, NULL, MARK);
for (i = get_irp_n_irgs() - 1; i >= 0; --i) {
ir_graph * irg = get_irp_irg(i);
entity * ent = get_irg_entity(irg);
ir_entity * ent = get_irg_entity(irg);
/* Removing any graph invalidates all interprocedural loop trees. */
if (get_irg_loopinfo_state(irg) == loopinfo_ip_consistent ||
get_irg_loopinfo_state(irg) == loopinfo_ip_inconsistent) {
......
......@@ -29,6 +29,6 @@
* ueberschrieben.
*
* Frees all interprocedural loop information. */
void gc_irgs(int n_keep, entity *keep_arr[]);
void gc_irgs(int n_keep, ir_entity *keep_arr[]);
#endif /* _FIRM_IR_ICGOPT_H_ */
......@@ -289,7 +289,7 @@ static void print_type_type_edge(FILE *F, ir_type *S, ir_type *T, const char *fm
* prints the edge from a type T to an entity E with additional info fmt, ...
* to the file F
*/
static void print_type_ent_edge(FILE *F, ir_type *T, entity *E, const char *fmt, ...)
static void print_type_ent_edge(FILE *F, ir_type *T, ir_entity *E, const char *fmt, ...)
{
va_list ap;
......@@ -305,7 +305,7 @@ static void print_type_ent_edge(FILE *F, ir_type *T, entity *E, const char *fmt,
* prints the edge from an entity E to an entity T with additional info fmt, ...
* to the file F
*/
static void print_ent_ent_edge(FILE *F, entity *E, entity *T, int backedge, const char *fmt, ...)
static void print_ent_ent_edge(FILE *F, ir_entity *E, ir_entity *T, int backedge, const char *fmt, ...)
{
va_list ap;
......@@ -325,7 +325,7 @@ static void print_ent_ent_edge(FILE *F, entity *E, entity *T, int backedge, cons
* prints the edge from an entity E to a type T with additional info fmt, ...
* to the file F
*/
static void print_ent_type_edge(FILE *F, entity *E, ir_type *T, const char *fmt, ...)
static void print_ent_type_edge(FILE *F, ir_entity *E, ir_type *T, const char *fmt, ...)
{
va_list ap;
......@@ -357,7 +357,7 @@ static void print_node_type_edge(FILE *F, const ir_node *N, ir_type *T, const ch
* prints the edge from a node N to an entity E with additional info fmt, ...
* to the file F
*/
static void print_node_ent_edge(FILE *F, const ir_node *N, entity *E, const char *fmt, ...)
static void print_node_ent_edge(FILE *F, const ir_node *N, ir_entity *E, const char *fmt, ...)
{
va_list ap;
......@@ -374,7 +374,7 @@ static void print_node_ent_edge(FILE *F, const ir_node *N, entity *E, const char
* prints the edge from an entity E to a node N with additional info fmt, ...
* to the file F
*/
static void print_ent_node_edge(FILE *F, entity *E, const ir_node *N, const char *fmt, ...)
static void print_ent_node_edge(FILE *F, ir_entity *E, const ir_node *N, const char *fmt, ...)
{
va_list ap;
......@@ -485,7 +485,7 @@ static void clear_link(ir_node * node, void * env) {
* If the entity has a ld_name, returns it if the dump_ld_name is set,
* else returns the name of the entity.
*/
static const char *_get_ent_dump_name(entity *ent, int dump_ld_name) {
static const char *_get_ent_dump_name(ir_entity *ent, int dump_ld_name) {
if (!ent)
return "<NULL entity>";
if (dump_ld_name) {
......@@ -499,7 +499,7 @@ static const char *_get_ent_dump_name(entity *ent, int dump_ld_name) {
* If the entity has a ld_name, returns it if the option dump_ld_name is set,
* else returns the name of the entity.
*/
const char *get_ent_dump_name(entity *ent) {
const char *get_ent_dump_name(ir_entity *ent) {
return _get_ent_dump_name(ent, dump_ld_name);
}
......@@ -726,7 +726,7 @@ int dump_node_opcode(FILE *F, ir_node *n)
}
case iro_CallBegin: {
ir_node *addr = get_CallBegin_ptr(n);
entity *ent = NULL;
ir_entity *ent = NULL;
if (get_irn_op(addr) == op_Sel)
ent = get_Sel_entity(addr);
else if ((get_irn_op(addr) == op_SymConst) && (get_SymConst_kind(addr) == symconst_addr_ent))
......@@ -1636,7 +1636,7 @@ static void dump_graph_info(FILE *F, ir_graph *irg) {
* If interprocedural view edges can point to nodes out of this graph.
*/
static void dump_graph_from_list(FILE *F, ir_graph *irg) {
entity *ent = get_irg_entity(irg);
ir_entity *ent = get_irg_entity(irg);
fprintf(F, "graph: { title: \"");
PRINT_IRGID(irg);
......@@ -1846,7 +1846,7 @@ int dump_type_node(FILE *F, ir_type *tp)
#define X(a) case a: fprintf(F, #a); break
void dump_entity_node(FILE *F, entity *ent, int color)
void dump_entity_node(FILE *F, ir_entity *ent, int color)
{
fprintf (F, "node: {title: \"");
PRINT_ENTID(ent); fprintf(F, "\"");
......@@ -1897,7 +1897,7 @@ dump_type_info(type_or_ent *tore, void *env) {
switch (get_kind(tore)) {
case k_entity:
{
entity *ent = (entity *)tore;
ir_entity *ent = (ir_entity *)tore;
ir_node *value;
/* The node */
dump_entity_node(F, ent, 0);
......@@ -2024,7 +2024,7 @@ dump_class_hierarchy_node (type_or_ent *tore, void *ctx) {
/* dump this type or entity */
switch (get_kind(tore)) {
case k_entity: {
entity *ent = (entity *)tore;
ir_entity *ent = (ir_entity *)tore;
if (get_entity_owner(ent) == get_glob_type()) break;
if (!is_Method_type(get_entity_type(ent))) break; /* GL */
if (env->dump_ent && is_Class_type(get_entity_owner(ent))) {
......@@ -2429,7 +2429,7 @@ void dump_ir_extblock_graph (ir_graph *irg, const char *suffix)
FILE *F;
int i;
char *suffix1;
entity *ent;
ir_entity *ent;
if (!is_filtered_dump_name(get_entity_ident(get_irg_entity(irg))))
return;
......@@ -2725,7 +2725,7 @@ static int compute_color (int my, int max) {
return base_color + n_colors - color;
}
static int get_entity_color(entity *ent) {
static int get_entity_color(ir_entity *ent) {
ir_graph *irg = get_entity_irg(ent);
assert(irg);
......@@ -2758,7 +2758,7 @@ void dump_callgraph(const char *suffix) {
for (i = get_irp_n_irgs() - 1; i >= 0; --i) {
ir_graph *irg = get_irp_irg(i);
entity *ent = get_irg_entity(irg);
ir_entity *ent = get_irg_entity(irg);
int j, n_callees = get_irg_n_callees(irg);
/* Do not dump runtime system. */
......@@ -2766,7 +2766,7 @@ void dump_callgraph(const char *suffix) {
dump_entity_node(F, ent, get_entity_color(ent));
for (j = 0; j < n_callees; ++j) {
entity *c = get_irg_entity(get_irg_callee(irg, j));
ir_entity *c = get_irg_entity(get_irg_callee(irg, j));
//if (id_is_prefix(prefix, get_entity_ld_ident(c))) continue;
int be = is_irg_callee_backedge(irg, j);
char *attr;
......
......@@ -510,12 +510,12 @@ typedef enum {
/** Write the entity and all its attributes to the passed file.
* */
void dump_entity_to_file (FILE *F, entity *ent, unsigned verbosity);
void dump_entity_to_file (FILE *F, ir_entity *ent, unsigned verbosity);
/** Write the entity and all its attributes to the stdout.
*
* Calls dump_entity_to_file(). */
void dump_entity (entity *ent);
void dump_entity (ir_entity *ent);
/** Write the type and all its attributes to the file passed.
* */
......
......@@ -69,7 +69,7 @@ const char *get_irg_dump_name(ir_graph *irg);
void vcg_close (FILE *F);
const char *get_ent_dump_name(entity *ent);
const char *get_ent_dump_name(ir_entity *ent);
const char *get_type_name_ex(ir_type *tp, int *bad);
const char *get_mode_name_ex(ir_mode *mode, int *bad);
/**
......
......@@ -223,7 +223,7 @@ int dump_irnode_to_file(FILE *F, ir_node *n) {
fprintf(F, " allocated on: the %s\n", (get_Free_where(n) == stack_alloc) ? "stack" : "heap");
} break;
case iro_Sel: {
entity *ent = get_Sel_entity(n);
ir_entity *ent = get_Sel_entity(n);
if (ent) {
fprintf(F, " Selecting entity %s (%ld)\n", get_entity_name(ent), get_entity_nr(ent));
fprintf(F, " of type %s\n", get_type_name_ex(get_entity_type(ent), &bad));
......@@ -476,7 +476,7 @@ static void dump_type_list(FILE *F, ir_type *tp, char *prefix,
fprintf(F, "\n");
}
void dump_entity_to_file_prefix (FILE *F, entity *ent, char *prefix, unsigned verbosity) {
void dump_entity_to_file_prefix (FILE *F, ir_entity *ent, char *prefix, unsigned verbosity) {
int i, j;
ir_type *owner, *type;
......@@ -498,7 +498,7 @@ void dump_entity_to_file_prefix (FILE *F, entity *ent, char *prefix, unsigned
if (get_entity_n_overwrites(ent) > 0) {
fprintf(F, "%s overwrites:\n", prefix);
for (i = 0; i < get_entity_n_overwrites(ent); ++i) {
entity *ov = get_entity_overwrites(ent, i);
ir_entity *ov = get_entity_overwrites(ent, i);
fprintf(F, "%s %d: %s of class %s\n", prefix, i, get_entity_name(ov),
get_type_name(get_entity_owner(ov)));
}
......@@ -508,7 +508,7 @@ void dump_entity_to_file_prefix (FILE *F, entity *ent, char *prefix, unsigned
if (get_entity_n_overwrittenby(ent) > 0) {
fprintf(F, "%s overwritten by:\n", prefix);
for (i = 0; i < get_entity_n_overwrittenby(ent); ++i) {
entity *ov = get_entity_overwrittenby(ent, i);
ir_entity *ov = get_entity_overwrittenby(ent, i);
fprintf(F, "%s %d: %s of class %s\n", prefix, i, get_entity_name(ov),
get_type_name(get_entity_owner(ov)));
}
......@@ -517,7 +517,7 @@ void dump_entity_to_file_prefix (FILE *F, entity *ent, char *prefix, unsigned
}
if (get_irp_inh_transitive_closure_state() != inh_transitive_closure_none) {
entity *ov;
ir_entity *ov;
fprintf(F, "%s transitive overwrites:\n", prefix);
for (ov = get_entity_trans_overwrites_first(ent);
ov;
......@@ -597,13 +597,13 @@ void dump_entity_to_file_prefix (FILE *F, entity *ent, char *prefix, unsigned
compute_compound_ent_array_indices(ent);
for (i = 0; i < get_compound_ent_n_values(ent); ++i) {
compound_graph_path *path = get_compound_ent_value_path(ent, i);
entity *ent0 = get_compound_graph_path_node(path, 0);
ir_entity *ent0 = get_compound_graph_path_node(path, 0);
fprintf(F, "\n%s %3d:%d ", prefix, get_entity_offset(ent0), get_entity_offset_bits_remainder(ent0));
if (get_type_state(type) == layout_fixed)
fprintf(F, "(%3d:%d) ", get_compound_ent_value_offset_bytes(ent, i), get_compound_ent_value_offset_bit_remainder(ent, i));
fprintf(F, "%s", get_entity_name(ent));
for (j = 0; j < get_compound_graph_path_length(path); ++j) {
entity *node = get_compound_graph_path_node(path, j);
ir_entity *node = get_compound_graph_path_node(path, j);
fprintf(F, ".%s", get_entity_name(node));
if (is_Array_type(get_entity_owner(node)))
fprintf(F, "[%d]", get_compound_graph_path_array_index(path, j));
......@@ -759,16 +759,16 @@ void dump_entity_to_file_prefix (FILE *F, entity *ent, char *prefix, unsigned
}
void dump_entity_to_file (FILE *F, entity *ent, unsigned verbosity) {
void dump_entity_to_file (FILE *F, ir_entity *ent, unsigned verbosity) {
dump_entity_to_file_prefix (F, ent, "", verbosity);
fprintf(F, "\n");
}
void dump_entity (entity *ent) {
void dump_entity (ir_entity *ent) {
dump_entity_to_file(stdout, ent, dump_verbosity_max);
}
void dump_entitycsv_to_file_prefix (FILE *F, entity *ent, char *prefix, unsigned verbosity,
void dump_entitycsv_to_file_prefix (FILE *F, ir_entity *ent, char *prefix, unsigned verbosity,
int *max_disp, int disp[], const char *comma) {
#if 0 /* Outputs loop depth of all occurrences. */
......@@ -913,7 +913,7 @@ void dump_typecsv_to_file(FILE *F, ir_type *tp, dump_verbosity verbosity, const
fprintf(F, "\n");
for (i = 0; i < get_class_n_members(tp); ++i) {
entity *mem = get_class_member(tp, i);
ir_entity *mem = get_class_member(tp, i);
if (((verbosity & dump_verbosity_methods) && is_Method_type(get_entity_type(mem))) ||
((verbosity & dump_verbosity_fields) && !is_Method_type(get_entity_type(mem))) ) {
if (!((verbosity & dump_verbosity_nostatic) && (get_entity_allocation(mem) == allocation_static))) {
......@@ -943,7 +943,7 @@ void dump_typecsv_to_file(FILE *F, ir_type *tp, dump_verbosity verbosity, const
}
for (i = 0; i < get_class_n_members(tp); ++i) {
entity *mem = get_class_member(tp, i);
ir_entity *mem = get_class_member(tp, i);
if (((verbosity & dump_verbosity_methods) && is_Method_type(get_entity_type(mem))) ||
((verbosity & dump_verbosity_fields) && !is_Method_type(get_entity_type(mem))) ) {
if (!((verbosity & dump_verbosity_nostatic) && (get_entity_allocation(mem) == allocation_static))) {
......@@ -976,7 +976,7 @@ void dump_type_to_file (FILE *F, ir_type *tp, dump_verbosity verbosity) {
fprintf(F, "\n members: \n");
}
for (i = 0; i < get_class_n_members(tp); ++i) {
entity *mem = get_class_member(tp, i);
ir_entity *mem = get_class_member(tp, i);
if (((verbosity & dump_verbosity_methods) && is_Method_type(get_entity_type(mem))) ||
((verbosity & dump_verbosity_fields) && !is_Method_type(get_entity_type(mem))) ) {
if (!((verbosity & dump_verbosity_nostatic) && (get_entity_allocation(mem) == allocation_static))) {
......@@ -1028,7 +1028,7 @@ void dump_type_to_file (FILE *F, ir_type *tp, dump_verbosity verbosity) {
case tpo_struct:
if (verbosity & dump_verbosity_fields) fprintf(F, "\n members: ");
for (i = 0; i < get_compound_n_members(tp); ++i) {
entity *mem = get_compound_member(tp, i);
ir_entity *mem = get_compound_member(tp, i);
if (verbosity & dump_verbosity_fields) {
dump_entity_to_file_prefix(F, mem, " ", verbosity);
}
......@@ -1240,7 +1240,7 @@ void dump_globals_as_text(unsigned verbosity, const char *suffix) {
}
for (i = 0; i < n_mems; ++i) {
entity *e = get_class_member(g, i);
ir_entity *e = get_class_member(g, i);
dump_entity_to_file(F, e, verbosity);
if (CSV) {
......
......@@ -1046,7 +1046,7 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
/* copy the entities. */
called_frame = get_irg_frame_type(called_graph);
for (i = 0; i < get_class_n_members(called_frame); i++) {
entity *new_ent, *old_ent;
ir_entity *new_ent, *old_ent;
old_ent = get_class_member(called_frame, i);
new_ent = copy_entity_own(old_ent, get_cur_frame_type());
set_entity_link(old_ent, new_ent);
......@@ -1410,7 +1410,7 @@ static void collect_calls2(ir_node *call, void *ctx) {
ir_node *symc = get_Call_ptr(call);
if (is_SymConst(symc) && get_SymConst_kind(symc) == symconst_addr_ent) {
entity *ent = get_SymConst_entity(symc);
ir_entity *ent = get_SymConst_entity(symc);
if (get_entity_additional_properties(ent) & mtp_property_runtime)
return;
......
......@@ -130,7 +130,7 @@ void free_Phi_in_stack(Phi_in_stack *s);
and optimization.
*/
ir_graph *
new_r_ir_graph (entity *ent, int n_loc)
new_r_ir_graph (ir_entity *ent, int n_loc)
{
ir_graph *res;
ir_node *first_block;
......@@ -263,7 +263,7 @@ new_r_ir_graph (entity *ent, int n_loc)
ir_graph *
new_ir_graph(entity *ent, int n_loc)
new_ir_graph(ir_entity *ent, int n_loc)
{
ir_graph *res = new_r_ir_graph(ent, n_loc);
add_irp_irg(res); /* remember this graph global. */
......@@ -564,13 +564,13 @@ void
_set_irg_current_block(irg, node);
}
entity *
ir_entity *
(get_irg_entity)(const ir_graph *irg) {
return _get_irg_entity(irg);
}
void
(set_irg_entity)(ir_graph *irg, entity *ent) {
(set_irg_entity)(ir_graph *irg, ir_entity *ent) {
_set_irg_entity(irg, ent);
}
......
......@@ -162,7 +162,7 @@ void set_interprocedural_view(int state);
*
* @see new_pseudo_ir_graph()
*/
ir_graph *new_ir_graph (entity *ent, int n_loc);
ir_graph *new_ir_graph (ir_entity *ent, int n_loc);
/** Frees the passed irgraph.
* Deallocates all nodes in this graph and the ir_graph structure.
......@@ -188,8 +188,8 @@ int is_ir_graph(const void *thing);
/* #define get_irg_entity get_irg_ent */
/* #define set_irg_entity set_irg_ent */
entity *get_irg_entity (const ir_graph *irg);
void set_irg_entity (ir_graph *irg, entity *ent);
ir_entity *get_irg_entity (const ir_graph *irg);
void set_irg_entity (ir_graph *irg, ir_entity *ent);
ir_type *get_irg_frame_type (ir_graph *irg);
void set_irg_frame_type (ir_graph *irg, ir_type *ftp);
......
......@@ -77,11 +77,11 @@ enum irg_anchors {
/** ir_graph holds all information for a procedure */
struct ir_graph {
firm_kind kind; /**< always set to k_ir_graph*/
firm_kind kind; /**< always set to k_ir_graph*/
/* -- Basics of the representation -- */
entity *ent; /**< The entity of this procedure, i.e.,
the type of the procedure and the
class it belongs to. */
ir_entity *ent; /**< The entity of this procedure, i.e.,
the type of the procedure and the
class it belongs to. */
ir_type *frame_type; /**< A class type representing the stack frame.
Can include "inner" methods. */
ir_node *anchors[anchor_max]; /**< anchor nodes */
......@@ -162,7 +162,7 @@ struct ir_graph {
void firm_init_irgraph(void);
/* Internal constructor that does not add to irp_irgs or the like. */
ir_graph *new_r_ir_graph (entity *ent, int n_loc);
ir_graph *new_r_ir_graph (ir_entity *ent, int n_loc);
/** Make a rudimentary ir graph for the constant code.
Must look like a correct irg, spare everything else. */
......@@ -354,14 +354,14 @@ _set_irg_current_block(ir_graph *irg, ir_node *node) {
irg->current_block = node;
}
static INLINE entity *
static INLINE ir_entity *
_get_irg_entity(const ir_graph *irg) {
assert(irg && irg->ent);
return irg->ent;
}
static INLINE void
_set_irg_entity(ir_graph *irg, entity *ent) {
_set_irg_entity(ir_graph *irg, ir_entity *ent) {
irg->ent = ent;
}
......
......@@ -119,7 +119,7 @@ static void collect_irgs(ir_node * node, eset * irg_set) {
if (is_Call(node)) {
int i;
for (i = get_Call_n_callees(node) - 1; i >= 0; --i) {
entity * ent = get_Call_callee(node, i);
ir_entity * ent = get_Call_callee(node, i);
ir_graph * irg = get_entity_irg(ent);
if (irg && !eset_contains(irg_set, irg)) {
eset_insert(irg_set, irg);
......@@ -665,7 +665,7 @@ typedef struct walk_env {
/**
* Walk to all constant expressions in this entity.
*/
static void walk_entity(entity *ent, void *env)
static void walk_entity(ir_entity *ent, void *env)
{
walk_env *my_env = (walk_env *)env;
......
......@@ -100,7 +100,7 @@ typedef struct hook_entry {
/** This hook is called, after a new graph was created and before the first block
* on this graph is build. */
void (*_hook_new_graph)(void *context, ir_graph *irg, entity *ent);
void (*_hook_new_graph)(void *context, ir_graph *irg, ir_entity *ent);
/** This hook is called before a graph is freed. */
void (*_hook_free_graph)(void *context, ir_graph *irg);
......@@ -155,7 +155,7 @@ typedef struct hook_entry {
void (*_hook_new_mode)(void *context, const ir_mode *tmpl, ir_mode *mode);
/** This hook is called after a new entity was created. */
void (*_hook_new_entity)(void *context, entity *ent);
void (*_hook_new_entity)(void *context, ir_entity *ent);
/** This hook is called after a new type was created. */
void (*_hook_new_type)(void *context, ir_type *tp);
......
......@@ -1114,12 +1114,12 @@ set_SymConst_name (ir_node *node, ident *name) {
/* Only to access SymConst of kind symconst_addr_ent. Else assertion: */
entity *get_SymConst_entity (ir_node *node) {
ir_entity *get_SymConst_entity (ir_node *node) {
assert(node->op == op_SymConst &&