X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Fentity_t.h;h=a3f46ca88ff3c2fab9554c48cd4906f782bfc8ed;hb=7cbf2ffb42818392ceb45b0289d3c05940f60a08;hp=c93d7b06ff602d8fd168eccc5a730293e3e1efb8;hpb=3e8544aa0a0f41a6700a829f50ec94d3b579b518;p=libfirm diff --git a/ir/tr/entity_t.h b/ir/tr/entity_t.h index c93d7b06f..a3f46ca88 100644 --- a/ir/tr/entity_t.h +++ b/ir/tr/entity_t.h @@ -18,7 +18,7 @@ */ /* - * @file entity_t.h + * @file * @brief Representation of all program known entities -- private header. * @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck * @version $Id$ @@ -28,12 +28,11 @@ #include -#include "firm_common_t.h" - #include "typerep.h" #include "type_t.h" #include "ident.h" #include "pseudo_irg.h" +#include "compound_path.h" typedef struct ir_initializer_base_t { ir_initializer_kind_t kind; @@ -72,18 +71,6 @@ union ir_initializer_t { ir_initializer_tarval_t tarval; }; -/** A path in a compound graph. */ -struct compound_graph_path { - firm_kind kind; /**< The dynamic type tag for compound graph path. */ - ir_type *tp; /**< The type this path belongs to. */ - int len; /**< The length of the path. */ - struct tuple { - int index; /**< Array index. To compute position of array elements */ - ir_entity *node; /**< The accessed entity. */ - } list[1]; /**< List of entity/index tuple of length len to express the - access path. */ -}; - /** The attributes for atomic entities. */ typedef struct atomic_ent_attr { ir_node *value; /**< value if entity is not of variability uninitialized. @@ -117,6 +104,11 @@ typedef struct method_ent_attr { with a high weight are good candidates for procedure cloning. */ } method_ent_attr; +/** additional attributes for code entities */ +typedef struct code_ent_attr { + ir_label_t label; /** label of the basic block */ +} code_ent_attr; + /** * An abstract data type to represent program entities. @@ -173,6 +165,8 @@ struct ir_entity { compound_ent_attr cmpd_attr; /* ------------- fields for method entities ---------------- */ method_ent_attr mtd_attr; + /* fields for code entities */ + code_ent_attr code_attr; /* entity initializer */ ir_initializer_t *initializer; } attr; /**< type specific attributes */ @@ -215,7 +209,7 @@ _set_entity_ident(ir_entity *ent, ident *id) { static inline ir_type * _get_entity_owner(ir_entity *ent) { assert(ent && ent->kind == k_entity); - return ent->owner = skip_tid(ent->owner); + return ent->owner; } static inline ident * @@ -242,7 +236,7 @@ _get_entity_ld_name(ir_entity *ent) { static inline ir_type * _get_entity_type(ir_entity *ent) { assert(ent && ent->kind == k_entity); - return ent->type = skip_tid(ent->type); + return ent->type; } static inline void