*/
/*
- * @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$
#include <assert.h>
-#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;
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.
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.
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 */
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 *
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