/**
* Returns an entity if the address ptr points to a constant one.
*/
-static entity *find_constant_entity(ir_node *ptr)
+static ir_entity *find_constant_entity(ir_node *ptr)
{
for (;;) {
ir_op *op = get_irn_op(ptr);
return get_SymConst_entity(ptr);
}
else if (op == op_Sel) {
- entity *ent = get_Sel_entity(ptr);
- ir_type *tp = get_entity_owner(ent);
+ ir_entity *ent = get_Sel_entity(ptr);
+ ir_type *tp = get_entity_owner(ent);
/* Do not fiddle with polymorphism. */
if (is_Class_type(get_entity_owner(ent)) &&
*/
static compound_graph_path *rec_get_accessed_path(ir_node *ptr, int depth) {
compound_graph_path *res = NULL;
- entity *root, *field;
+ ir_entity *root, *field;
int path_len, pos;
if (get_irn_op(ptr) == op_SymConst) {
{
ldst_info_t *info = get_irn_link(load);
ir_node *mem, *ptr, *new_node;
- entity *ent;
+ ir_entity *ent;
unsigned res = 0;
/* do NOT touch volatile loads for now */
if (get_irn_op(skip_Proj(mem)) == op_Alloc) {
/* ok, check the types */
- entity *ent = get_Sel_entity(ptr);
- ir_type *s_type = get_entity_type(ent);
- ir_type *a_type = get_Alloc_type(mem);
+ ir_entity *ent = get_Sel_entity(ptr);
+ ir_type *s_type = get_entity_type(ent);
+ ir_type *a_type = get_Alloc_type(mem);
if (is_SubClass_of(s_type, a_type)) {
/* ok, condition met: there can't be an exception because
{
int j;
for (j = 0; j < get_compound_graph_path_length(path); ++j) {
- entity *node = get_compound_graph_path_node(path, j);
+ ir_entity *node = get_compound_graph_path_node(path, j);
fprintf(stdout, ".%s", get_entity_name(node));
if (is_Array_type(get_entity_owner(node)))
fprintf(stdout, "[%d]", get_compound_graph_path_array_index(path, j));
return 0;
/* check if the block is post dominated by Phi-block
- and has no exception exit */
+ and has no exception exit. Note that block must be different from
+ Phi-block, else we would move a Store from end End of a block to its
+ Start... */
bl_info = get_irn_link(block);
if (bl_info->flags & BLOCK_HAS_EXC)
return 0;
- if (! block_postdominates(phi_block, block))
+ if (block == phi_block || ! block_postdominates(phi_block, block))
return 0;
}