X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Fentity_t.h;h=4a16d0c6555eaffe789e222d07bcb9cc38947eb2;hb=2b248c834c848378e01d0593667a4984bd59ca7f;hp=bbc084b52973ddde1ceb595b703f8d23e7d686d7;hpb=1ce363f80e6a204d4011f85813362d9bd1d0e7e4;p=libfirm diff --git a/ir/tr/entity_t.h b/ir/tr/entity_t.h index bbc084b52..4a16d0c65 100644 --- a/ir/tr/entity_t.h +++ b/ir/tr/entity_t.h @@ -36,6 +36,34 @@ #include "ident.h" #include "pseudo_irg.h" +typedef struct ir_initializer_base_t { + ir_initializer_kind_t kind; +} ir_initializer_base_t; + +typedef struct ir_initializer_compound_t { + ir_initializer_base_t base; + unsigned n_initializers; + ir_initializer_t *initializers[1]; +} ir_initializer_compound_t; + +typedef struct ir_initializer_const_t { + ir_initializer_base_t base; + ir_node *value; +} ir_initializer_const_t ; + +typedef struct ir_initializer_tarval_t { + ir_initializer_base_t base; + tarval *value; +} ir_initializer_tarval_t ; + +union ir_initializer_t { + ir_initializer_kind_t kind; + ir_initializer_base_t base; + ir_initializer_compound_t compound; + ir_initializer_const_t consti; + 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. */ @@ -77,9 +105,8 @@ typedef struct method_ent_attr { in the virtual function table. */ ptr_access_kind *param_access; /**< the parameter access */ - float *param_weight; /**< The weight of method's parameters. Parameters - with a high weight are good for procedure cloning. */ - ir_img_section section; /**< The code section where this method should be placed */ + unsigned *param_weight; /**< The weight of method's parameters. Parameters + with a high weight are good candidates for procedure cloning. */ } method_ent_attr; @@ -112,6 +139,7 @@ struct ir_entity { unsigned final:1; /**< If set, this entity cannot be overridden. */ unsigned compiler_gen:1; /**< If set, this entity was compiler generated. */ unsigned backend_marked:1; /**< If set, this entity was marked by the backend for emission. */ + unsigned has_initializer:1; int offset; /**< Offset in bytes for this entity. Fixed when layout of owner is determined. */ unsigned char offset_bit_remainder; @@ -136,6 +164,8 @@ struct ir_entity { compound_ent_attr cmpd_attr; /* ------------- fields for method entities ---------------- */ method_ent_attr mtd_attr; + /* entity initializer */ + ir_initializer_t *initializer; } attr; /**< type specific attributes */ /* ------------- fields for analyses ---------------*/