#include "typerep.h"
#include "type_t.h"
#include "ident.h"
-#include "compound_path.h"
typedef struct ir_initializer_base_t {
ir_initializer_kind_t kind;
ir_initializer_tarval_t tarval;
};
-/** The attributes for compound entities. */
-typedef struct compound_ent_attr {
- ir_node **values; /**< constant values of compound entities. */
- compound_graph_path **val_paths;
- /**< paths corresponding to constant values. */
-} compound_ent_attr;
-
/** The attributes for methods. */
typedef struct method_ent_attr {
ir_graph *irg; /**< The corresponding irg if known.
} code_ent_attr;
typedef struct parameter_ent_attr {
- /**< parameters might be compounds too */
- compound_ent_attr cmpd_attr;
-
size_t number; /**< corresponding parameter number */
ir_mode *doubleword_low_mode;/**< entity is a lowered doubleword parameter,
so additional stores because of calling
IR_ENTITY_COMPOUND_MEMBER,
IR_ENTITY_PARAMETER,
IR_ENTITY_LABEL,
+ IR_ENTITY_UNKNOWN,
} ir_entity_kind;
/**
#endif
union {
- /* ------------- fields for compound entities -------------- */
- compound_ent_attr cmpd_attr;
/* ------------- fields for method entities ---------------- */
method_ent_attr mtd_attr;
/* fields for code entities */
};
/** Initialize the entity module. */
-void ir_init_entity(void);
+void ir_init_entity(ir_prog *irp);
/** Cleanup entity module */
-void ir_finish_entity(void);
+void ir_finish_entity(ir_prog *irp);
/**
* Creates an entity corresponding to the start address of a basic block
*/
ir_entity *new_d_label_entity(ir_label_t label, dbg_info *dbgi);
+void set_entity_irg(ir_entity *ent, ir_graph *irg);
+
/* ----------------------- inline functions ------------------------ */
static inline int _is_entity(const void *thing)
{
static inline ir_graph *_get_entity_irg(const ir_entity *ent)
{
assert(ent && ent->kind == k_entity);
- if (!is_Method_type(ent->type) || ent == unknown_entity) {
+ if (!is_Method_type(ent->type) || is_unknown_entity(ent)) {
return NULL;
}