Commit 3fbdb625 authored by Michael Beck's avatar Michael Beck
Browse files

rename type entity into ir_entity

parent c4196781
......@@ -228,13 +228,13 @@ static arch_irn_flags_t ppc32_get_flags(const void *self, const ir_node *irn) {
return 0;
}
static entity *ppc32_get_frame_entity(const void *self, const ir_node *irn) {
static ir_entity *ppc32_get_frame_entity(const void *self, const ir_node *irn) {
if(!is_ppc32_irn(irn)) return NULL;
if(get_ppc32_type(irn)!=ppc32_ac_FrameEntity) return NULL;
return get_ppc32_frame_entity(irn);
}
static void ppc32_set_frame_entity(const void *self, const ir_node *irn, entity *ent) {
static void ppc32_set_frame_entity(const void *self, const ir_node *irn, ir_entity *ent) {
if (! is_ppc32_irn(irn) || get_ppc32_type(irn) != ppc32_ac_FrameEntity)
return;
set_ppc32_frame_entity(irn, ent);
......@@ -290,10 +290,10 @@ static void ppc32_abi_done(void *self)
static ir_type *ppc32_abi_get_between_type(void *self)
{
static ir_type *between_type = NULL;
static entity *old_bp_ent = NULL;
static ir_entity *old_bp_ent = NULL;
if(!between_type) {
entity *ret_addr_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_bp_type = new_type_primitive(new_id_from_str("bp"), mode_P);
......@@ -589,7 +589,7 @@ static void ppc32_emit_and_done(void *self) {
}
}
int is_direct_entity(entity *ent);
int is_direct_entity(ir_entity *ent);
/**
* Collects all SymConsts which need to be accessed "indirectly"
......@@ -600,7 +600,7 @@ int is_direct_entity(entity *ent);
void ppc32_collect_symconsts_walk(ir_node *node, void *env) {
if(get_irn_op(node) == op_SymConst)
{
entity *ent = get_SymConst_entity(node);
ir_entity *ent = get_SymConst_entity(node);
if(!is_direct_entity(ent))
pset_insert_ptr(symbol_pset, ent);
}
......
......@@ -18,7 +18,7 @@ typedef struct _ppc32_code_gen_t {
ppc32_isa_t *isa; /**< the isa instance */
const be_irg_t *birg; /**< The be-irg (contains additional information about the irg) */
unsigned area_size; /**< size of call area for the current irg */
entity *area; /**< the entity representing the call area or NULL for leaf functions */
ir_entity *area; /**< the entity representing the call area or NULL for leaf functions */
ir_node *start_succ_block; /**< the block succeeding the start block in the cfg */
ir_node **blk_sched; /**< an array containing the scheduled blocks */
DEBUG_ONLY(firm_dbg_module_t *mod;) /**< debugging module */
......
......@@ -358,7 +358,7 @@ static void emit_Jmp(const ir_node *irn, ppc32_emit_env_t *env) {
*/
static void emit_be_Call(const ir_node *irn, ppc32_emit_env_t *env) {
FILE *F = env->out;
entity *call_ent = be_Call_get_entity(irn);
ir_entity *call_ent = be_Call_get_entity(irn);
if(call_ent)
{
......@@ -534,7 +534,7 @@ static void emit_be_IncSP(const ir_node *irn, ppc32_emit_env_t *emit_env) {
/*static void emit_Spill(const ir_node *irn, ppc32_emit_env_t *emit_env) {
ir_node *context = be_get_Spill_context(irn);
entity *entity = be_get_spill_entity(irn);
ir_entity *entity = be_get_spill_entity(irn);
}*/
/***********************************************************************************
......
......@@ -273,7 +273,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;
......@@ -324,7 +324,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;
......@@ -364,7 +364,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);
......@@ -411,7 +411,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)) {
......@@ -461,10 +461,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++)
......@@ -479,7 +479,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;
......@@ -567,12 +567,12 @@ void ppc32_dump_globals(struct obstack *rdata_obstack, struct obstack *data_obst
void ppc32_dump_indirect_symbols(struct obstack *isyms)
{
entity *ent;
for(ent=pset_first(symbol_pset); ent; ent=pset_next(symbol_pset))
{
const char *ld_name = get_entity_ld_name(ent);
obstack_printf(isyms, ".non_lazy_symbol_pointer\n%s:\n\t.indirect_symbol _%s\n\t.long 0\n\n",ld_name,ld_name);
}
ir_entity *ent;
foreach_pset(symbol_pset, ent) {
const char *ld_name = get_entity_ld_name(ent);
obstack_printf(isyms, ".non_lazy_symbol_pointer\n%s:\n\t.indirect_symbol _%s\n\t.long 0\n\n",ld_name,ld_name);
}
}
/************************************************************************/
......
......@@ -425,7 +425,7 @@ ident *get_ppc32_symconst_ident(const ir_node *node) {
/**
* Sets an entity (also updating the content_type)
*/
void set_ppc32_frame_entity(const ir_node *node, entity *ent) {
void set_ppc32_frame_entity(const ir_node *node, ir_entity *ent) {
ppc32_attr_t *attr = get_ppc32_attr(node);
attr->content_type = ppc32_ac_FrameEntity;
attr->data.frame_entity = ent;
......@@ -434,7 +434,7 @@ void set_ppc32_frame_entity(const ir_node *node, entity *ent) {
/**
* Returns an entity
*/
entity *get_ppc32_frame_entity(const ir_node *node) {
ir_entity *get_ppc32_frame_entity(const ir_node *node) {
ppc32_attr_t *attr = get_ppc32_attr(node);
return attr->data.frame_entity;
}
......
......@@ -102,8 +102,8 @@ tarval *get_ppc32_constant_tarval(const ir_node *node);
void set_ppc32_symconst_ident(const ir_node *node, ident *symconst_ident);
ident *get_ppc32_symconst_ident(const ir_node *node);
void set_ppc32_frame_entity(const ir_node *node, entity *ent);
entity *get_ppc32_frame_entity(const ir_node *node);
void set_ppc32_frame_entity(const ir_node *node, ir_entity *ent);
ir_entity *get_ppc32_frame_entity(const ir_node *node);
void set_ppc32_rlwimi_const(const ir_node *node, unsigned shift, unsigned maskA, unsigned maskB);
rlwimi_const_t *get_ppc32_rlwimi_const(const ir_node *node);
......
......@@ -43,7 +43,7 @@ typedef struct _ppc32_attr_t {
union {
tarval *constant_tarval;
ident *symconst_ident;
entity *frame_entity;
ir_entity *frame_entity;
rlwimi_const_t rlwimi_const;
int proj_nr;
int offset;
......
......@@ -32,7 +32,7 @@
extern pset *symbol_pset;
extern ir_op *get_op_Mulh(void);
int is_direct_entity(entity *ent);
int is_direct_entity(ir_entity *ent);
ir_mode* ppc32_mode_Cond = NULL;
......@@ -964,7 +964,7 @@ static ir_node *ldst_insert_const(ir_node *ptr, tarval **ptv, ident **pid, ppc32
}
else if(is_ppc32_SymConst(ptr))
{
entity *ent = get_ppc32_frame_entity(ptr);
ir_entity *ent = get_ppc32_frame_entity(ptr);
if(is_direct_entity(ent))
{
id_symconst = get_entity_ident(ent);
......@@ -1404,7 +1404,7 @@ void ppc32_transform_node(ir_node *node, void *env) {
*/
struct tv_ent {
entity *ent;
ir_entity *ent;
tarval *tv;
};
......@@ -1424,7 +1424,7 @@ static ir_node *gen_fp_known_symconst(ppc32_transform_env_t *env, tarval *known_
struct tv_ent *entry;
ir_node *cnst,*symcnst;
ir_graph *rem;
entity *ent;
ir_entity *ent;
if(!const_set)
const_set = new_set(cmp_tv_ent, 10);
......@@ -1564,7 +1564,7 @@ static ir_node *gen_ppc32_fConst(ppc32_transform_env_t *env) {
{
ir_node *addr, *load;
ir_mode *mode = env->mode;
entity *ent;
ir_entity *ent;
env->irn = gen_fp_known_symconst(env, tv_const);
env->mode = mode_P;
ent = get_ppc32_frame_entity(env->irn);
......@@ -1605,7 +1605,7 @@ static ir_node *gen_ppc32_fConst(ppc32_transform_env_t *env) {
* Returns true, if the entity can be accessed directly,
* or false, if the address must be loaded first
*/
int is_direct_entity(entity *ent) {
int is_direct_entity(ir_entity *ent) {
return get_entity_visibility(ent)!=visibility_external_allocated;
/* visibility vis = get_entity_visibility(ent);
if(is_Method_type(get_entity_type(ent)))
......@@ -1628,7 +1628,7 @@ int is_direct_entity(entity *ent) {
* @return the created ppc Load immediate node
*/
static ir_node *gen_ppc32_SymConst(ppc32_transform_env_t *env) {
entity *ent = get_ppc32_frame_entity(env->irn);
ir_entity *ent = get_ppc32_frame_entity(env->irn);
ident *id_symconst = get_entity_ident(ent);
ir_node *node;
switch(get_nice_modecode(env->mode)){
......
......@@ -38,7 +38,7 @@ typedef struct
ir_node *current_block;
int conv_nodes_found;
entity *memslot;
ir_entity *memslot;
ir_node *memory;
/**
......@@ -55,7 +55,7 @@ static ir_node *own_gen_convert_call(ppc32_transform_env_t *env, ir_node *op, co
ir_mode *from_mode, ir_mode *to_mode)
{
ir_type *method_type;
entity *method_ent;
ir_entity *method_ent;
ir_node *in[1];
ir_node *call, *callee, *call_results;
......@@ -235,7 +235,7 @@ void init_block(void)
*/
struct tv_ent {
entity *ent;
ir_entity *ent;
tarval *tv;
};
......@@ -255,7 +255,7 @@ static ir_node *gen_fp_known_symconst(ppc32_transform_env_t *env, tarval *known_
struct tv_ent *entry;
ir_node *cnst;
ir_graph *rem;
entity *ent;
ir_entity *ent;
if(!const_set)
const_set = new_set(cmp_tv_ent, 10);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment