Commit 2327654f authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Split SymConst into EntConst and TypeConst.

This removes the strange entity/type duality and we get rid of union symconst_symbol.
parent f94a224d
......@@ -48,8 +48,8 @@
* and Craig Chambers.
*
* Performs some optimizations possible by the analysed information:
* - Replace (Sel-method(Alloc)) by SymConst-entity.
* - Replaces Sel-method by SymConst-entity if the method is never overwritten.
* - Replace (Sel-method(Alloc)) by EntConst-entity.
* - Replaces Sel-method by EntConst-entity if the method is never overwritten.
*/
FIRM_API size_t cgana(ir_entity ***free_methods);
......
......@@ -264,34 +264,27 @@ typedef enum mtp_additional_properties {
ENUM_BITSET(mtp_additional_properties)
/**
* @ingroup SymConst
* @ingroup EntConst
* This enum names the different kinds of symbolic Constants represented by
* SymConst. The content of the attribute symconst_symbol depends on this tag.
* Use the proper access routine after testing this flag.
* EntConst.
*/
typedef enum symconst_kind {
symconst_type_size, /**< The SymConst is the size of the given type.
symconst_symbol is type *. */
symconst_type_align, /**< The SymConst is the alignment of the given type.
symconst_symbol is type *. */
symconst_addr_ent, /**< The SymConst is a symbolic pointer to be filled in
typedef enum entconst_kind {
entconst_addr, /**< The EntConst is a symbolic pointer to be filled in
by the linker. The pointer is represented by an
entity. symconst_symbol is entity *. */
symconst_ofs_ent, /**< The SymConst is the offset of its entity in the
entity. */
entconst_ofs, /**< The EntConst is the offset of its entity in the
entities owner type. */
} symconst_kind;
} entconst_kind;
/**
* @ingroup SymConst
* SymConst attribute.
*
* This union contains the symbolic information represented by the node.
* @ingroup SymConst
* @ingroup TypeConst
* This enum names the different kinds of symbolic Constants represented by
* TypeConst.
*/
typedef union symconst_symbol {
ir_type *type_p; /**< The type of a SymConst. */
ir_entity *entity_p; /**< The entity of a SymConst. */
} symconst_symbol;
typedef enum typeconst_kind {
typeconst_size, /**< The TypeConst is the size of the given type. */
typeconst_align, /**< The TypeConst is the alignment of the given type. */
} typeconst_kind;
/** A input/output constraint attribute.
* @ingroup ASM
......
......@@ -354,183 +354,6 @@ FIRM_API ir_node *new_Const_long(ir_mode *mode, long value);
/** @} */
/** addtogroup SymConst
* @{
*/
/** Constructor for a SymConst node.
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
* - symconst_type_align The symbolic constant represents the alignment of a
* type. The type of which the constant represents the
* size is given explicitly.
* - symconst_addr_ent The symbolic constant represents the address of an
* entity (variable or method). The variable is given
* explicitly by a firm entity.
* - symconst_ofs_ent The symbolic constant represents the offset of an
* entity in its owner type.
*
* Inputs to the node:
* No inputs except the block it belongs to.
* Outputs of the node.
* An unsigned integer (I_u) or a pointer (P).
*
* Mention union in declaration so that the firmjni generator recognizes that
* it can not cast the argument to an int.
*
* @param *db A pointer for debug information.
* @param *irg The IR graph the node belongs to.
* @param mode The mode for the SymConst.
* @param value A type, ident, entity or enum constant depending on the
* SymConst kind.
* @param kind The kind of the symbolic constant, see the list above
*/
FIRM_API ir_node *new_rd_SymConst(dbg_info *db, ir_graph *irg, ir_mode *mode,
union symconst_symbol value,
symconst_kind kind);
/** Constructor for a SymConst addr_ent node.
*
* Same as new_rd_SymConst, except that the constructor is tailored for
* symconst_addr_ent.
* Adds the SymConst to the start block of irg.
*/
FIRM_API ir_node *new_rd_SymConst_addr_ent(dbg_info *db, ir_graph *irg,
ir_mode *mode, ir_entity *symbol);
/** Constructor for a SymConst ofs_ent node.
*
* Same as new_rd_SymConst, except that the constructor is tailored for
* symconst_ofs_ent.
* Adds the SymConst to the start block of irg.
*/
FIRM_API ir_node *new_rd_SymConst_ofs_ent(dbg_info *db, ir_graph *irg,
ir_mode *mode, ir_entity *symbol);
/** Constructor for a SymConst size node.
*
* Same as new_rd_SymConst, except that the constructor is tailored for
* symconst_type_size.
* Adds the SymConst to the start block of irg.
*/
FIRM_API ir_node *new_rd_SymConst_size(dbg_info *db, ir_graph *irg,
ir_mode *mode, ir_type *symbol);
/** Constructor for a SymConst size node.
*
* Same as new_rd_SymConst, except that the constructor is tailored for
* symconst_type_align.
* Adds the SymConst to the start block of irg.
*/
FIRM_API ir_node *new_rd_SymConst_align(dbg_info *db, ir_graph *irg,
ir_mode *mode, ir_type *symbol);
/** Constructor for a SymConst node.
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
* - symconst_type_align The symbolic constant represents the alignment of a
* type. The type of which the constant represents the
* size is given explicitly.
* - symconst_addr_ent The symbolic constant represents the address of an
* entity (variable or method). The variable is given
* explicitly by a firm entity.
* - symconst_ofs_ent The symbolic constant represents the offset of an
* entity in its owner type.
*
* Inputs to the node:
* No inputs except the block it belongs to.
* Outputs of the node.
* An unsigned integer (I_u) or a pointer (P).
*
* Mention union in declaration so that the firmjni generator recognizes that
* it can not cast the argument to an int.
*
* @param *irg The IR graph the node belongs to.
* @param mode The mode for the SymConst.
* @param value A type, ident, entity or enum constant depending on the
* SymConst kind.
* @param kind The kind of the symbolic constant, see the list above
*/
FIRM_API ir_node *new_r_SymConst(ir_graph *irg, ir_mode *mode,
union symconst_symbol value,
symconst_kind kind);
/** Constructor for an SymConst node
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
* - symconst_type_align The symbolic constant represents the alignment of a
* type. The type of which the constant represents the
* size is given explicitly.
* - symconst_addr_ent The symbolic constant represents the address of an
* entity (variable or method). The variable is given
* explicitly by a firm entity.
* - symconst_ofs_ent The symbolic constant represents the offset of an
* entity in its owner type.
*
* Inputs to the node:
* No inputs except the block it belongs to.
* Outputs of the node.
* An unsigned integer (I_u) or a pointer (P).
*
* Mention union in declaration so that the firmjni generator recognizes that
* it can not cast the argument to an int.
*
* @param *db A pointer for debug information.
* @param mode The mode for the SymConst.
* @param value A type, ident, entity or enum constant depending on the
* SymConst kind.
* @param kind The kind of the symbolic constant, see the list above
*/
FIRM_API ir_node *new_d_SymConst(dbg_info *db, ir_mode *mode,
union symconst_symbol value,
symconst_kind kind);
/** Constructor for a SymConst node.
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
* - symconst_type_align The symbolic constant represents the alignment of a
* type. The type of which the constant represents the
* size is given explicitly.
* - symconst_addr_ent The symbolic constant represents the address of an
* entity (variable or method). The variable is given
* explicitly by a firm entity.
* - symconst_ofs_ent The symbolic constant represents the offset of an
* entity in its owner type.
*
* Inputs to the node:
* No inputs except the block it belongs to.
* Outputs of the node.
* An unsigned integer (I_u) or a pointer (P).
*
* Mention union in declaration so that the firmjni generator recognizes that
* it can not cast the argument to an int.
*
* @param mode The mode for the SymConst.
* @param value A type, ident, entity or enum constant depending on the
* SymConst kind.
* @param kind The kind of the symbolic constant, see the list above
*/
FIRM_API ir_node *new_SymConst(ir_mode *mode, union symconst_symbol value,
symconst_kind kind);
/** @} */
/** @addtogroup Sel
* @{
*/
......
......@@ -333,44 +333,14 @@ FIRM_API int is_Const_all_one(const ir_node *node);
/** @} */
/**
* @addtogroup SymConst
* @addtogroup EntConst
* @{
*/
/**
* Returns true if node is a SymConst node with kind symconst_addr_ent.
* Returns true if node is a EntConst node with kind entconst_addr.
*/
FIRM_API int is_SymConst_addr_ent(const ir_node *node);
/** Returns non-zero if s symconst kind has a type attribute */
#define SYMCONST_HAS_TYPE(kind) ((kind) <= symconst_type_align)
/** Returns non-zero if s symconst kind has an entity attribute */
#define SYMCONST_HAS_ENT(kind) ((kind) == symconst_addr_ent || (kind) == symconst_ofs_ent)
/** Returns the kind of the SymConst. */
FIRM_API symconst_kind get_SymConst_kind(const ir_node *node);
/** Sets the kind of the SymConst. */
FIRM_API void set_SymConst_kind(ir_node *node, symconst_kind num);
/** Returns the type attribute of SymConst node @p node.
* @note Only to access SymConst of kind type_siz, else assertion.
*/
FIRM_API ir_type *get_SymConst_type(const ir_node *node);
/** Sets the type attribute of SymConst node @p node. */
FIRM_API void set_SymConst_type(ir_node *node, ir_type *tp);
/** Returns the entity attribute of SymConst node @p node.
* @note Only to access SymConst of kind addr_ent, else assertion.
*/
FIRM_API ir_entity *get_SymConst_entity(const ir_node *node);
/** Sets the entity attribute of Symconst node @p node. */
FIRM_API void set_SymConst_entity(ir_node *node, ir_entity *ent);
/** Returns the symbol attribute of SymConst node @p node. */
FIRM_API union symconst_symbol get_SymConst_symbol(const ir_node *node);
/** Sets the symbol attribute of SymConst node @p node. */
FIRM_API void set_SymConst_symbol(ir_node *node, union symconst_symbol sym);
FIRM_API int is_EntConst_addr(const ir_node *node);
/** @} */
......@@ -382,7 +352,7 @@ FIRM_API void set_SymConst_symbol(ir_node *node, union symconst_symbol sym);
/**
* Convenience function: Return method that will be called by a call.
*
* This matches for an address of entity SymConst at the Call ptr input, return
* This matches for an address at the Call ptr input, return
* the referenced entity if it has a method type.
*/
FIRM_API ir_entity *get_Call_callee(const ir_node *call);
......@@ -540,11 +510,11 @@ FIRM_API int is_irn_forking(const ir_node *node);
*/
FIRM_API void copy_node_attr(ir_graph *irg, const ir_node *old_node, ir_node *new_node);
/** Returns the type attribute of a node n (SymConst, Call, Alloc, Free)
/** Returns the type attribute of a node n (TypeConst, Call, Alloc, Free)
* or NULL.*/
FIRM_API ir_type *get_irn_type_attr(ir_node *n);
/** Returns the entity attribute of a node n (SymConst, Sel) or NULL. */
/** Returns the entity attribute of a node n (EntConst, Sel) or NULL. */
FIRM_API ir_entity *get_irn_entity_attr(ir_node *n);
/** Returns non-zero for constant-like nodes. */
......
......@@ -571,7 +571,7 @@ FIRM_API int value_not_zero(const ir_node *n, const ir_node **confirm);
*
* - If option sel_based_null_check_elim is enabled, all
* Sel nodes can be skipped.
* - A SymConst(entity) is NEVER a NULL pointer
* - A EntConst is NEVER a NULL pointer
* - A Const != NULL is NEVER a NULL pointer
* - Confirms are evaluated
*
......
......@@ -92,7 +92,7 @@ FIRM_API void lower_switch(ir_graph *irg, unsigned small_switch,
unsigned spare_size, ir_mode *selector_mode);
/**
* Replaces SymConsts by a real constant if possible.
* Replaces EntConsts and TypeConsts by a real constant if possible.
* Replaces Sel nodes by address computation. Also resolves array access.
* Handle bit fields by added And/Or calculations.
*
......@@ -104,7 +104,7 @@ FIRM_API void lower_switch(ir_graph *irg, unsigned small_switch,
FIRM_API void lower_highlevel_graph(ir_graph *irg);
/**
* Replaces SymConsts by a real constant if possible.
* Replaces EntConsts and TypeConsts by a real constant if possible.
* Replaces Sel nodes by address computation. Also resolves array access.
* Handle bit fields by added And/Or calculations.
* Lowers all graphs.
......
......@@ -25,7 +25,7 @@
* Each type gets a list of all Alloc nodes allocating it.
* Each entity gets two lists:
* - one containing all accesses (Load, (Call), Store),
* - and one containing all uses to get a reference (Sel, SymConst).
* - and one containing all uses to get a reference (Sel, EntConst).
* @{
*/
......@@ -34,11 +34,11 @@ FIRM_API size_t get_entity_n_accesses(const ir_entity *entity);
/** Returns Load/Store node number @p pos that possibly accesses entity @p entity. */
FIRM_API ir_node *get_entity_access(const ir_entity *entity, size_t pos);
/** Returns number of references to entity @p entity, in form of SymConst/Sel,
/** Returns number of references to entity @p entity, in form of EntConst/Sel,
* including references from constant entities and the like. */
FIRM_API size_t get_entity_n_references(const ir_entity *entity);
/** Returns reference number @p pos of references to an entity, in form of
* SymConst/Sel, including references from constants. */
* EntConst/Sel, including references from constants. */
FIRM_API ir_node *get_entity_reference(const ir_entity *entity, size_t pos);
/** Returns number of Alloc nodes that create an instance of type @p type. */
......@@ -66,8 +66,8 @@ FIRM_API ir_type *get_type_arraytype_of(const ir_type *type, size_t pos);
* Alloc --> get_Alloc_type()
* Cast --> get_Cast_type()
* Sel --> get_Sel_entity()
* SymConst --> get_SymConst_entity()
* Load(addr) --> get_addr_entity() \ ent von SymConst, oder falls Sel: ent von
* EntConst --> get_EntConst_entity()
* Load(addr) --> get_addr_entity() \ ent von EntConst, oder falls Sel: ent von
* Store(addr) --> get_addr_entity() / outermost im compound. Ansonsten: nirgends.
* d.h. wir bekommen die array Elementzugriffe
* an die jack array Klasse annotiert.
......
......@@ -676,7 +676,7 @@ FIRM_API void add_entity_additional_properties(ir_entity *ent,
* - owner = unknown_type
* - type = unknown_type
* - offset = -1
* - value = SymConst(unknown_entity)
* - value = EntConst(unknown_entity)
* - values = NULL
* - val_paths = NULL
* - volatility = volatility_non_volatile
......
......@@ -169,7 +169,7 @@ static void sel_methods_walker(ir_node *node, void *env)
return;
/* we may have a vtable entry and need this redirection to get the actually
* called method */
ir_entity *const called = get_SymConst_entity(get_atomic_ent_value(entity));
ir_entity *const called = get_EntConst_entity(get_atomic_ent_value(entity));
if (!pset_find_ptr(entities, called)) {
/* Entity not yet handled. Find all (internal or external)
* implemented methods that overwrites this entity.
......@@ -186,7 +186,7 @@ static void sel_methods_walker(ir_node *node, void *env)
* an implementation. The set is stored in the entity's link field.
*
* Further replaces Sel nodes where this set contains exactly one
* method by SymConst nodes.
* method by EntConst nodes.
*/
static void sel_methods_init(void)
{
......@@ -303,9 +303,9 @@ static void free_mark(ir_node *node, pset *set)
}
break;
}
case iro_SymConst:
if (get_SymConst_kind(node) == symconst_addr_ent) {
const ir_entity *ent = get_SymConst_entity(node);
case iro_EntConst:
if (get_EntConst_kind(node) == entconst_addr) {
const ir_entity *ent = get_EntConst_entity(node);
if (is_method_entity(ent)) {
pset_insert_ptr(set, ent);
}
......@@ -340,12 +340,13 @@ static void free_ana_walker(ir_node *node, void *env)
switch (get_irn_opcode(node)) {
/* special nodes */
case iro_Sel:
case iro_SymConst:
case iro_EntConst:
case iro_Const:
case iro_Phi:
case iro_Id:
case iro_Proj:
case iro_Tuple:
case iro_TypeConst:
/* nothing */
break;
case iro_Call:
......@@ -393,8 +394,8 @@ static void add_method_address_inititializer(ir_initializer_t *initializer,
ir_node *n = initializer->consti.value;
/* let's check if it's the address of a function */
if (is_SymConst_addr_ent(n)) {
ir_entity *ent = get_SymConst_entity(n);
if (is_EntConst_addr(n)) {
ir_entity *ent = get_EntConst_entity(n);
if (is_Method_type(get_entity_type(ent)))
pset_insert_ptr(set, ent);
......@@ -560,10 +561,10 @@ static void callee_ana_node(ir_node *node, pset *methods)
pset_insert_ptr(methods, get_unknown_entity()); /* free method -> unknown */
break;
case iro_SymConst: {
if (!is_SymConst_addr_ent(node))
case iro_EntConst: {
if (!is_EntConst_addr(node))
break;
ir_entity *ent = get_SymConst_entity(node);
ir_entity *ent = get_EntConst_entity(node);
if (is_method_entity(ent))
pset_insert_ptr(methods, ent);
break;
......@@ -688,7 +689,7 @@ static void destruct_walker(ir_node *node, void *env)
size_t cgana(ir_entity ***free_methods)
{
/* Optimize Sel/SymConst nodes and compute all methods that implement an entity. */
/* Optimize Sel/EntConst nodes and compute all methods that implement an entity. */
sel_methods_init();
size_t length = get_free_methods(free_methods);
callee_ana();
......@@ -715,7 +716,7 @@ void opt_call_addrs(void)
*
* This optimization performs the following transformations for
* all ir graphs:
* - All SymConst operations that refer to intern methods are replaced
* - All EntConst operations that refer to intern methods are replaced
* by Const operations referring to the corresponding entity.
* - Sel nodes, that select entities that are not overwritten are
* replaced by Const nodes referring to the selected entity.
......
......@@ -257,7 +257,7 @@ static void handle_if(ir_node *block, ir_node *cmp, ir_relation rel, env_t *env)
return;
/* try to place the constant on the right side for a Confirm */
if (is_Const(left) || is_SymConst(left)) {
if (is_Const(left) || is_EntConst(left) || is_TypeConst(left)) {
ir_node *t = left;
left = right;
right = t;
......@@ -441,11 +441,11 @@ static bool is_non_null_Confirm(const ir_node *ptr)
ptr = get_Confirm_value(ptr);
}
/*
* While a SymConst is not a Confirm, it is non-null
* While an EntConst is not a Confirm, it is non-null
* anyway. This helps to reduce the number of
* constructed Confirms.
*/
if (is_SymConst_addr_ent(ptr))
if (is_EntConst_addr(ptr))
return true;
return false;
}
......
......@@ -345,13 +345,13 @@ static ir_alias_relation different_types(const ir_node *adr1,
ir_entity *ent1 = NULL;
ir_entity *ent2 = NULL;
if (is_SymConst_addr_ent(adr1))
ent1 = get_SymConst_entity(adr1);
if (is_EntConst_addr(adr1))
ent1 = get_EntConst_entity(adr1);
else if (is_Sel(adr1))
ent1 = get_Sel_entity(adr1);
if (is_SymConst_addr_ent(adr2))
ent2 = get_SymConst_entity(adr2);
if (is_EntConst_addr(adr2))
ent2 = get_EntConst_entity(adr2);
else if (is_Sel(adr2))
ent2 = get_Sel_entity(adr2);
......@@ -408,8 +408,8 @@ ir_storage_class_class_t classify_pointer(const ir_node *irn,
{
ir_graph *irg = get_irn_irg(irn);
ir_storage_class_class_t res = ir_sc_pointer;
if (is_SymConst_addr_ent(irn)) {
ir_entity *entity = get_SymConst_entity(irn);
if (is_EntConst_addr(irn)) {
ir_entity *entity = get_EntConst_entity(irn);
ir_type *owner = get_entity_owner(entity);
res = owner == get_tls_type() ? ir_sc_tls : ir_sc_globalvar;
if (!(get_entity_usage(entity) & ir_usage_address_taken))
......@@ -631,12 +631,12 @@ static ir_alias_relation _get_alias_relation(
} else {
/* both classes are equal */
if (class1 == ir_sc_globalvar) {
ir_entity *entity1 = get_SymConst_entity(base1);
ir_entity *entity2 = get_SymConst_entity(base2);
ir_entity *entity1 = get_EntConst_entity(base1);
ir_entity *entity2 = get_EntConst_entity(base2);
if (entity1 != entity2)
return ir_no_alias;
/* for some reason CSE didn't happen yet for the 2 SymConsts... */
/* for some reason CSE didn't happen yet for the 2 EntConsts... */
return ir_may_alias;
} else if (class1 == ir_sc_globaladdr) {
ir_tarval *tv = get_Const_tarval(base1);
......@@ -1059,8 +1059,8 @@ static void check_initializer_value(ir_node *value)
return;
/* let's check if it's an address */
if (is_SymConst_addr_ent(value)) {
ir_entity *ent = get_SymConst_entity(value);
if (is_EntConst_addr(value)) {
ir_entity *ent = get_EntConst_entity(value);
set_entity_usage(ent, ir_usage_unknown);
}
......@@ -1172,10 +1172,10 @@ static void print_entity_usage_flags(const ir_type *tp)
static void check_global_address(ir_node *irn, void *data)
{
(void) data;
if (!is_SymConst_addr_ent(irn))
if (!is_EntConst_addr(irn))
return;
ir_entity *entity = get_SymConst_entity(irn);
ir_entity *entity = get_EntConst_entity(irn);
unsigned flags = get_entity_usage(entity);
flags |= determine_entity_usage(irn, entity);
set_entity_usage(entity, (ir_entity_usage) flags);
......@@ -1339,8 +1339,8 @@ void mark_private_methods(void)
static ir_entity *find_entity(ir_node *ptr)
{
switch (get_irn_opcode(ptr)) {
case iro_SymConst:
return get_SymConst_entity(ptr);
case iro_EntConst:
return get_EntConst_entity(ptr);
case iro_Sel:
return get_Sel_entity(ptr);
case iro_Sub:
......
......@@ -238,15 +238,15 @@ static ir_entity *get_Sel_accessed_entity(const ir_node *sel)
return get_Sel_entity(sel);
}
/** An addr node is a SymConst or a Sel. */
/** An addr node is a EntConst or a Sel. */
static int get_addr_n_entities(const ir_node *addr)
{
switch (get_irn_opcode(addr)) {
case iro_Sel:
/* Treat jack array sels? */
return get_Sel_n_accessed_entities(addr);
case iro_SymConst:
if (get_SymConst_kind(addr) == symconst_addr_ent)
case iro_EntConst:
if (get_EntConst_kind(addr) == entconst_addr)
return 1;
return 0;
default:
......@@ -254,7 +254,7 @@ static int get_addr_n_entities(const ir_node *addr)
}
}
/** An addr node is a SymConst or a Sel.
/** An addr node is a EntConst or a Sel.
If Sel follow to outermost of compound. */
static ir_entity *get_addr_entity(const ir_node *addr, int pos)
{
......@@ -270,10 +270,10 @@ static ir_entity *get_addr_entity(const ir_node *addr, int pos)
assert(0 <= pos && pos < get_Sel_n_accessed_entities(addr));
return get_Sel_accessed_entity(addr);
}
case iro_SymConst:
if (get_SymConst_kind(addr) == symconst_addr_ent) {
case iro_EntConst:
if (get_EntConst_kind(addr) == entconst_addr) {
assert(pos == 0);
return get_SymConst_entity(addr);
return get_EntConst_entity(addr);
}
return NULL;
default:
......@@ -288,8 +288,8 @@ static void chain_accesses(ir_node *n, void *env)
if (is_Sel(n)) {
add_entity_reference(get_Sel_entity(n), n);
return;
} else if (is_SymConst_addr_ent(n)) {
add_entity_reference(get_SymConst_entity(n), n);
} else if (is_EntConst_addr(n)) {
add_entity_reference(get_EntConst_entity(n), n);
return;
} else if (is_Store(n)) {
addr = get_Store_ptr(n);
......