Commit a2332307 authored by Matthias Braun's avatar Matthias Braun
Browse files

rework alias analysis API

You now only have to specify 1 type and the size of the access instead
of 2 types. Also cleaned up some code/comments in the process.
parent 6647a215
......@@ -57,43 +57,20 @@ ENUM_BITSET(ir_disambiguator_options)
FIRM_API const char *get_ir_alias_relation_name(ir_alias_relation rel);
/**
* Determine the alias relation between two addresses.
* Determine if two memory addresses may point to the same memory location.
* This is determined by looking at the structure of the values or language
* rules determined by looking at the object types accessed.
*
* @param addr1 The first address.
* @param type1 The type of the first memory access.
* @param objt1 The type of the object found at addr1 ("object type")
* @param type1 The type of the object found at @p addr1 ("object type").
* @param size1 The size in bytes of the first memory access.
* @param addr2 The second address.
* @param type2 The type of the second memory access.
* @param objt2 The type of the object found at addr2 ("object type")
*
* The memory disambiguator tries to determine the alias state between
* two memory addresses. The following rules are used:
*
* - different variable from the same segment never alias (R1 a)
* - variables from different segments never alias when:
* - a global variable and a local one never alias (R1 b)
* - a global variable and a TLS one never alias (R1 c)
* - a local variable and a TLS one never alias (R1 d)
* - a local variable and a parameter never alias (R1 e)
* - a global variable and the result of a malloc routine never alias (R1 f)
* - a local variable and the result of a malloc routine never alias (R1 g)
* - a TLS variable and the result of a malloc routine never alias (R1 h)
* - a parameter and the result of a malloc routine (obtained in the
* same routine as the parameter) never alias (R1 i)
* - two different variables never alias (R2)
* - if one is a variable whose address has never been taken
* there is no alias (R3)
* - if two memory addresses have the same base and their offsets
* do not describe overlapping regions there is no alias (R4)
* - if opt_strong_typed is set and both addresses describe entities,
* different types never alias (R5)
*
* If none of these rules apply, the points-to framework must be
* interrogated to detect the alias relation.
* @param type2 The type of the object found at @p addr2 ("object type").
* @param size2 The size in bytes of the second memory access.
*/
FIRM_API ir_alias_relation get_alias_relation(
const ir_node *addr1, const ir_type *type1, const ir_type *objt1,
const ir_node *addr2, const ir_type *type2, const ir_type *objt2);
const ir_node *addr1, const ir_type *type1, unsigned size1,
const ir_node *addr2, const ir_type *type2, unsigned size2);
/**
* Assure that the entity usage flags have been computed for the given graph.
......
......@@ -28,6 +28,7 @@
#include "panic.h"
#include "typerep.h"
#include "type_t.h"
#include "util.h"
/** The debug handle. */
DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
......@@ -237,21 +238,9 @@ analyze_entity:
return res;
}
/**
* Determine the alias relation between two addresses.
*
* @param addr1 pointer address of the first memory operation
* @param type1 the type of the operation accessing addr1
* @param objt1 the type of the object found at addr1 ("object type")
* @param addr2 pointer address of the second memory operation
* @param type2 the type of the operation accessing addr2
* @param objt2 the type of the object found at addr2 ("object type")
*
* @return found memory relation
*/
static ir_alias_relation _get_alias_relation(
const ir_node *addr1, const ir_type *const type1, const ir_type *const objt1,
const ir_node *addr2, const ir_type *const type2, const ir_type *const objt2)
const ir_node *addr1, const ir_type *const objt1, unsigned size1,
const ir_node *addr2, const ir_type *const objt2, unsigned size2)
{
if (addr1 == addr2)
return ir_sure_alias;
......@@ -264,8 +253,7 @@ static ir_alias_relation _get_alias_relation(
return ir_no_alias;
/* do the addresses have constants offsets from the same base?
* Note: sub X, C is normalized to add X, -C
*/
* Note: sub X, C is normalized to add X, -C */
long offset1 = 0;
long offset2 = 0;
const ir_node *sym_offset1 = NULL;
......@@ -345,24 +333,23 @@ follow_ptr2:
}
/* same base address -> compare offsets if possible.
* FIXME: type long is not sufficient for this task ...
*/
* FIXME: type long is not sufficient for this task ... */
if (addr1 == addr2 && sym_offset1 == sym_offset2 && have_const_offsets) {
unsigned long first_offset;
unsigned long last_offset;
unsigned first_type_size;
unsigned first_size;
if (offset1 <= offset2) {
first_offset = offset1;
last_offset = offset2;
first_type_size = get_type_size_bytes(type1);
first_size = size1;
} else {
first_offset = offset2;
last_offset = offset1;
first_type_size = get_type_size_bytes(type2);
first_size = size2;
}
return first_offset + first_type_size <= last_offset
return first_offset + first_size <= last_offset
? ir_no_alias : ir_sure_alias;
}
......@@ -448,11 +435,7 @@ check_classes:;
tv = get_Const_tarval(base2);
offset2 += get_tarval_long(tv);
unsigned type_size = get_type_size_bytes(type1);
if (get_type_size_bytes(type2) > type_size) {
type_size = get_type_size_bytes(type2);
}
unsigned type_size = MAX(size1, size2);
if ((unsigned long)labs(offset2 - offset1) >= type_size)
return ir_no_alias;
else
......@@ -506,10 +489,10 @@ leave_type_based_alias:;
}
ir_alias_relation get_alias_relation(
const ir_node *const addr1, const ir_type *const type1, const ir_type *const objt1,
const ir_node *const addr2, const ir_type *const type2, const ir_type *const objt2)
const ir_node *const addr1, const ir_type *const type1, unsigned size1,
const ir_node *const addr2, const ir_type *const type2, unsigned size2)
{
ir_alias_relation rel = _get_alias_relation(addr1, type1, objt1, addr2, type2, objt2);
ir_alias_relation rel = _get_alias_relation(addr1, type1, size1, addr2, type2, size2);
DB((dbg, LEVEL_1, "alias(%+F, %+F) = %s\n", addr1, addr2,
get_ir_alias_relation_name(rel)));
return rel;
......
......@@ -111,14 +111,10 @@ static void replace_may_alias(ir_node *node)
ir_type *type = get_Builtin_type(node);
ir_type *type0 = get_pointer_points_to_type(get_method_param_type(type, 0));
ir_type *type1 = get_pointer_points_to_type(get_method_param_type(type, 1));
if (is_unknown_type(type0))
type0 = get_type_for_mode(mode_P);
if (is_unknown_type(type1))
type1 = get_type_for_mode(mode_P);
ir_type *rtype = get_method_res_type(type, 0);
ir_mode *rmode = get_type_mode(rtype);
ir_alias_relation alias = get_alias_relation(in0, type0, type0, in1, type1, type1);
ir_alias_relation alias = get_alias_relation(in0, type0, 1, in1, type1, 1);
ir_graph *const irg = get_irn_irg(node);
ir_node *const result = (alias != ir_no_alias ? new_r_Const_one : new_r_Const_null)(irg, rmode);
......
......@@ -574,8 +574,8 @@ static bool try_update_ptr_CopyB(track_load_env_t *env, ir_node *copyb)
static changes_t follow_load_mem_chain(track_load_env_t *env, ir_node *start)
{
ir_node *load = env->load;
ir_mode *load_mode = get_Load_mode(load);
ir_type *load_objt = get_Load_type(load);
ir_type *load_type = get_Load_type(load);
unsigned load_size = get_mode_size_bytes(get_Load_mode(load));
ir_node *node = start;
changes_t res = NO_CHANGES;
......@@ -591,13 +591,11 @@ static changes_t follow_load_mem_chain(track_load_env_t *env, ir_node *start)
/* check if we can pass through this store */
const ir_node *ptr = get_Store_ptr(node);
const ir_node *value = get_Store_value(node);
const ir_type *store_objt = get_Store_type(node);
const ir_mode *mode = get_irn_mode(value);
const ir_type *store_type = get_type_for_mode(mode);
const ir_type *load_type = get_type_for_mode(load_mode);
const ir_type *store_type = get_Store_type(node);
unsigned store_size = get_mode_size_bytes(get_irn_mode(value));
ir_alias_relation rel = get_alias_relation(
ptr, store_type, store_objt,
env->ptr, load_type, load_objt);
ptr, store_type, store_size,
env->ptr, load_type, load_size);
/* if the might be an alias, we cannot pass this Store */
if (rel != ir_no_alias)
break;
......@@ -625,18 +623,19 @@ static changes_t follow_load_mem_chain(track_load_env_t *env, ir_node *start)
* Load immediately.
*/
res |= NODES_CREATED;
ir_mode *load_mode = get_Load_mode(load);
ir_node *new_value = predict_load(env->ptr, load_mode);
if (new_value != NULL)
return replace_load(load, new_value) | res;
}
/* check aliasing with the CopyB */
ir_node *dst = get_CopyB_dst(node);
ir_type *type = get_CopyB_type(node);
ir_type *load_type = get_type_for_mode(load_mode);
ir_node *dst = get_CopyB_dst(node);
ir_type *type = get_CopyB_type(node);
unsigned size = get_type_size_bytes(type);
ir_alias_relation rel = get_alias_relation(
dst, type, type,
env->ptr, load_type, load_objt);
dst, type, size,
env->ptr, load_type, load_size);
/* possible alias => we cannot continue */
if (rel != ir_no_alias)
break;
......@@ -739,15 +738,6 @@ static changes_t optimize_load(ir_node *load)
return res;
}
/**
* Check whether a value of mode new_mode would completely overwrite a value
* of mode old_mode in memory.
*/
static bool is_completely_overwritten(ir_mode *old_mode, ir_mode *new_mode)
{
return get_mode_size_bits(new_mode) >= get_mode_size_bits(old_mode);
}
/**
* Check whether small is a part of large (starting at same address).
*/
......@@ -776,9 +766,8 @@ static changes_t follow_store_mem_chain(ir_node *store, ir_node *start,
ir_node *ptr = get_Store_ptr(store);
ir_node *mem = get_Store_mem(store);
ir_node *value = get_Store_value(store);
ir_type *objt = get_Store_type(store);
ir_mode *mode = get_irn_mode(value);
ir_type *type = get_type_for_mode(mode);
ir_type *type = get_Store_type(store);
unsigned size = get_mode_size_bytes(get_irn_mode(value));
ir_node *block = get_nodes_block(store);
ir_node *node = start;
......@@ -811,9 +800,9 @@ static changes_t follow_store_mem_chain(ir_node *store, ir_node *start,
&& !node_info->projs[pn_Store_X_except]) {
ir_node *predvalue = get_Store_value(node);
ir_mode *predmode = get_irn_mode(predvalue);
unsigned predsize = get_mode_size_bytes(predmode);
if (is_completely_overwritten(predmode, mode)
|| is_partially_same(predvalue, value)) {
if (predsize <= size || is_partially_same(predvalue, value)) {
DBG_OPT_WAW(node, store);
DB((dbg, LEVEL_1, " killing store %+F (override by %+F)\n",
node, store));
......@@ -865,22 +854,22 @@ static changes_t follow_store_mem_chain(ir_node *store, ir_node *start,
/* check if we can pass through this store */
ir_node *store_ptr = get_Store_ptr(node);
ir_node *store_value = get_Store_value(node);
ir_type *store_type = get_type_for_mode(get_irn_mode(store_value));
ir_type *store_objt = get_Store_type(node);
unsigned store_size = get_mode_size_bytes(get_irn_mode(store_value));
ir_type *store_type = get_Store_type(node);
ir_alias_relation rel = get_alias_relation(
store_ptr, store_type, store_objt,
ptr, type, objt);
store_ptr, store_type, store_size,
ptr, type, size);
/* if the might be an alias, we cannot pass this Store */
if (rel != ir_no_alias)
break;
node = skip_Proj(get_Store_mem(node));
} else if (is_Load(node)) {
ir_node *load_ptr = get_Load_ptr(node);
ir_type *load_type = get_type_for_mode(get_Load_mode(node));
ir_type *load_objt = get_Load_type(node);
ir_type *load_type = get_Load_type(node);
unsigned load_size = get_mode_size_bytes(get_Load_mode(node));
ir_alias_relation rel = get_alias_relation(
load_ptr, load_type, load_objt,
ptr, type, objt);
load_ptr, load_type, load_size,
ptr, type, size);
if (rel != ir_no_alias)
break;
......@@ -888,15 +877,16 @@ static changes_t follow_store_mem_chain(ir_node *store, ir_node *start,
} else if (is_CopyB(node)) {
ir_node *copyb_src = get_CopyB_src(node);
ir_type *copyb_type = get_CopyB_type(node);
unsigned copyb_size = get_type_size_bytes(copyb_type);
ir_alias_relation src_rel = get_alias_relation(
copyb_src, copyb_type, copyb_type,
ptr, type, objt);
copyb_src, copyb_type, copyb_size,
ptr, type, size);
if (src_rel != ir_no_alias)
break;
ir_node *copyb_dst = get_CopyB_dst(node);
ir_alias_relation dst_rel = get_alias_relation(
copyb_dst, copyb_type, copyb_type,
ptr, type, objt);
copyb_dst, copyb_type, copyb_size,
ptr, type, size);
if (dst_rel != ir_no_alias)
break;
} else {
......@@ -1009,12 +999,12 @@ static bool ptr_is_in_struct(ir_node *ptr, ir_type *ptr_type,
static changes_t follow_copyb_mem_chain(ir_node *copyb, ir_node *start,
bool had_split)
{
changes_t res = NO_CHANGES;
ir_node *src = get_CopyB_src(copyb);
ir_node *dst = get_CopyB_dst(copyb);
ir_type *type = get_CopyB_type(copyb);
unsigned type_size = get_type_size_bytes(type);
ir_node *block = get_nodes_block(copyb);
changes_t res = NO_CHANGES;
ir_node *src = get_CopyB_src(copyb);
ir_node *dst = get_CopyB_dst(copyb);
ir_type *type = get_CopyB_type(copyb);
unsigned size = get_type_size_bytes(type);
ir_node *block = get_nodes_block(copyb);
ir_node *node = start;
while (node != copyb) {
......@@ -1024,19 +1014,17 @@ static changes_t follow_copyb_mem_chain(ir_node *copyb, ir_node *start,
&& get_Store_volatility(node) != volatility_is_volatile
&& !node_info->projs[pn_Store_X_except] && !had_split
&& get_nodes_block(node) == block) {
/*
* If the CopyB completely overwrites the Store,
/* If the CopyB completely overwrites the Store,
* and the Store does not modify the CopyB's source memory,
* and the Store has no exception handler,
* the Store can be removed.
* This is basically a write-after-write.
*/
* This is basically a write-after-write. */
ir_node *store_ptr = get_Store_ptr(node);
ir_type *store_type = get_type_for_mode(get_irn_mode(store_ptr));
ir_type *store_objt = get_Store_type(node);
ir_type *store_type = get_Store_type(node);
unsigned store_size = get_mode_size_bytes(get_irn_mode(store_ptr));
ir_alias_relation src_rel = get_alias_relation(
src, type, type,
store_ptr, store_type, store_objt);
src, type, size,
store_ptr, store_type, store_size);
if (src_rel == ir_no_alias
&& ptr_is_in_struct(store_ptr, store_type, dst, type)) {
......@@ -1051,40 +1039,40 @@ static changes_t follow_copyb_mem_chain(ir_node *copyb, ir_node *start,
if (is_Store(node)) {
ir_node *store_ptr = get_Store_ptr(node);
ir_type *store_type = get_Store_type(node);
ir_node *store_value = get_Store_value(node);
ir_type *store_type = get_type_for_mode(get_irn_mode(store_value));
ir_type *store_objt = get_Store_type(node);
unsigned store_size = get_mode_size_bytes(get_irn_mode(store_value));
/* check if we can pass through this store */
ir_alias_relation src_rel = get_alias_relation(
store_ptr, store_type, store_objt,
src, type, type);
store_ptr, store_type, store_size,
src, type, size);
if (src_rel != ir_no_alias)
break;
ir_alias_relation dst_rel = get_alias_relation(
store_ptr, store_type, store_objt,
dst, type, type);
store_ptr, store_type, store_size,
dst, type, size);
if (dst_rel != ir_no_alias)
break;
node = skip_Proj(get_Store_mem(node));
} else if (is_Load(node)) {
ir_node *load_ptr = get_Load_ptr(node);
ir_type *load_type = get_type_for_mode(get_Load_mode(node));
ir_type *load_objt = get_Load_type(node);
ir_type *load_type = get_Load_type(node);
unsigned load_size = get_mode_size_bytes(get_Load_mode(node));
ir_alias_relation rel = get_alias_relation(
load_ptr, load_type, load_objt,
dst, type, type);
load_ptr, load_type, load_size,
dst, type, size);
if (rel != ir_no_alias)
break;
node = skip_Proj(get_Load_mem(node));
} else if (is_CopyB(node)) {
ir_node *pred_dst = get_CopyB_dst(node);
ir_node *pred_src = get_CopyB_src(node);
ir_type *pred_type = get_CopyB_type(node);
unsigned pred_type_size = get_type_size_bytes(pred_type);
ir_node *pred_dst = get_CopyB_dst(node);
ir_node *pred_src = get_CopyB_src(node);
ir_type *pred_type = get_CopyB_type(node);
unsigned pred_size = get_type_size_bytes(pred_type);
if (src == pred_dst && type_size == pred_type_size
if (src == pred_dst && size == pred_size
&& get_CopyB_volatility(node) == volatility_non_volatile) {
src = pred_src;
......@@ -1102,18 +1090,18 @@ static changes_t follow_copyb_mem_chain(ir_node *copyb, ir_node *start,
}
} else {
ir_alias_relation dst_dst_rel = get_alias_relation(
pred_dst, pred_type, pred_type,
dst, type, type);
pred_dst, pred_type, pred_size,
dst, type, size);
if (dst_dst_rel != ir_no_alias)
break;
ir_alias_relation src_dst_rel = get_alias_relation(
pred_src, pred_type, pred_type,
dst, type, type);
pred_src, pred_type, pred_size,
dst, type, size);
if (src_dst_rel != ir_no_alias)
break;
ir_alias_relation dst_src_rel = get_alias_relation(
pred_dst, pred_type, pred_type,
src, type, type);
pred_dst, pred_type, pred_size,
src, type, size);
if (dst_src_rel != ir_no_alias)
break;
}
......@@ -1657,9 +1645,9 @@ static void move_loads_out_of_loops(scc *pscc, loop_env *env)
/* for now, we can only move Load(Global) */
if (!is_Address(ptr))
continue;
ir_type *load_type = get_Load_type(load);
ir_mode *load_mode = get_Load_mode(load);
ir_type *load_type = get_type_for_mode(load_mode);
ir_type *load_objt = get_Load_type(load);
unsigned load_size = get_mode_size_bytes(load_mode);
ir_node *other;
ir_node *next_other;
for (other = pscc->head; other != NULL; other = next_other) {
......@@ -1669,13 +1657,12 @@ static void move_loads_out_of_loops(scc *pscc, loop_env *env)
if (is_Store(other)) {
ir_node *store_ptr = get_Store_ptr(other);
ir_node *store_value = get_Store_value(other);
ir_type *store_type
= get_type_for_mode(get_irn_mode(store_value));
ir_type *store_objt = get_Store_type(other);
ir_type *store_type = get_Store_type(other);
unsigned store_size = get_mode_size_bytes(get_irn_mode(store_value));
ir_alias_relation rel = get_alias_relation(
store_ptr, store_type, store_objt,
ptr, load_type, load_objt);
store_ptr, store_type, store_size,
ptr, load_type, load_size);
/* if the might be an alias, we cannot pass this Store */
if (rel != ir_no_alias)
break;
......@@ -1705,7 +1692,7 @@ static void move_loads_out_of_loops(scc *pscc, loop_env *env)
if (res != NULL) {
irn = res->load;
} else {
irn = new_rd_Load(db, pred, get_Phi_pred(phi, pos), ptr, load_mode, load_objt, cons_none);
irn = new_rd_Load(db, pred, get_Phi_pred(phi, pos), ptr, load_mode, load_type, cons_none);
entry.load = irn;
(void)set_insert(avail_entry_t, avail, &entry, sizeof(entry), hash_cache_entry(&entry));
DB((dbg, LEVEL_1, " Created %+F in %+F\n", irn, pred));
......
......@@ -924,9 +924,13 @@ static void kill_memops(const value_t *value)
ir_type *value_type = get_type_for_mode(value->mode);
ir_type *op_type = get_type_for_mode(op->value.mode);
/* TODO: determining the access size by the type of the accessed objects
* is too conservative... */
unsigned value_size = get_type_size_bytes(value_type);
unsigned op_size = get_type_size_bytes(op_type);
if (ir_no_alias != get_alias_relation(value->address, value_type, value_type,
op->value.address, op_type, op_type)) {
if (ir_no_alias != get_alias_relation(value->address, value_type, value_size,
op->value.address, op_type, op_size)) {
rbitset_clear(env.curr_set, pos);
env.curr_id_2_memop[pos] = NULL;
DB((dbg, LEVEL_2, "KILLING %+F because of possible alias address %+F\n", op->node, value->address));
......
......@@ -30,8 +30,8 @@ typedef struct parallelize_info
{
ir_node *origin_block;
ir_node *origin_ptr;
ir_type *origin_ldst_type; /**< Type derived from Load/Store mode */
ir_type *origin_obj_type; /**< Type of the object in memory */
ir_type *origin_type; /**< Type if ptr destination. */
unsigned origin_size; /**< size of memory access. */
ir_nodeset_t this_mem;
ir_nodeset_t user_mem;
ir_nodeset_t all_visited;
......@@ -56,14 +56,14 @@ static void parallelize_load(parallelize_info *pi, ir_node *irn)
return;
} else if (is_Store(pred) &&
get_Store_volatility(pred) == volatility_non_volatile) {
ir_type *org_type = pi->origin_ldst_type;
ir_type *org_objt = pi->origin_obj_type;
ir_type *org_type = pi->origin_type;
unsigned org_size = pi->origin_size;
ir_node *org_ptr = pi->origin_ptr;
ir_type *store_type = get_type_for_mode(get_irn_mode(get_Store_value(pred)));
ir_type *store_objt = get_Store_type(pred);
ir_type *store_type = get_Store_type(pred);
unsigned store_size = get_mode_size_bytes(get_irn_mode(get_Store_value(pred)));
ir_node *store_ptr = get_Store_ptr(pred);
if (get_alias_relation(org_ptr, org_type, org_objt,
store_ptr, store_type, store_objt) == ir_no_alias) {
if (get_alias_relation(org_ptr, org_type, org_size,
store_ptr, store_type, store_size) == ir_no_alias) {
ir_node *mem = get_Store_mem(pred);
ir_nodeset_insert(&pi->user_mem, irn);
parallelize_load(pi, mem);
......@@ -78,13 +78,14 @@ static void parallelize_load(parallelize_info *pi, ir_node *irn)
return;
} else if (is_CopyB(irn) &&
get_CopyB_volatility(irn) == volatility_non_volatile) {
ir_type *org_type = pi->origin_ldst_type;
ir_type *org_objt = pi->origin_obj_type;
ir_type *org_type = pi->origin_type;
unsigned org_size = pi->origin_size;
ir_node *org_ptr = pi->origin_ptr;
ir_type *copyB_type = get_CopyB_type(irn);
ir_node *copyB_dst = get_CopyB_dst(irn);
if (get_alias_relation(org_ptr, org_type, org_objt,
copyB_dst, copyB_type, copyB_type) == ir_no_alias) {
unsigned copyB_size = get_type_size_bytes(copyB_type);
if (get_alias_relation(org_ptr, org_type, org_size,
copyB_dst, copyB_type, copyB_size) == ir_no_alias) {
ir_node *mem = get_CopyB_mem(irn);
ir_nodeset_insert(&pi->user_mem, irn);
parallelize_load(pi, mem);
......@@ -108,14 +109,14 @@ static void parallelize_store(parallelize_info *pi, ir_node *irn)
ir_node *pred = get_Proj_pred(irn);
if (is_Load(pred)
&& get_Load_volatility(pred) == volatility_non_volatile) {
ir_type *org_type = pi->origin_ldst_type;
ir_type *org_objt = pi->origin_obj_type;
ir_node *org_ptr = pi->origin_ptr;
ir_type *load_type = get_type_for_mode(get_Load_mode(pred));
ir_type *load_objt = get_Load_type(pred);
ir_type *org_type = pi->origin_type;
unsigned org_size = pi->origin_size;
ir_node *load_ptr = get_Load_ptr(pred);
if (get_alias_relation(org_ptr, org_type, org_objt,
load_ptr, load_type, load_objt) == ir_no_alias) {
ir_type *load_type = get_Load_type(pred);
unsigned load_size = get_mode_size_bytes(get_Load_mode(pred));
if (get_alias_relation(org_ptr, org_type, org_size,
load_ptr, load_type, load_size) == ir_no_alias) {
ir_node *mem = get_Load_mem(pred);
ir_nodeset_insert(&pi->user_mem, irn);
parallelize_store(pi, mem);
......@@ -123,14 +124,14 @@ static void parallelize_store(parallelize_info *pi, ir_node *irn)
}
} else if (is_Store(pred)
&& get_Store_volatility(pred) == volatility_non_volatile) {
ir_type *org_type = pi->origin_ldst_type;
ir_type *org_objt = pi->origin_obj_type;
ir_node *org_ptr = pi->origin_ptr;
ir_type *store_type = get_type_for_mode(get_irn_mode(get_Store_value(pred)));
ir_type *store_objt = get_Store_type(pred);
ir_type *org_type = pi->origin_type;
unsigned org_size = pi->origin_size;
ir_node *store_ptr = get_Store_ptr(pred);
if (get_alias_relation(org_ptr, org_type, org_objt,
store_ptr, store_type, store_objt) == ir_no_alias) {
ir_type *store_type = get_Store_type(pred);
unsigned store_size = get_mode_size_bytes(get_irn_mode(get_Store_value(pred)));
if (get_alias_relation(org_ptr, org_type, org_size,
store_ptr, store_type, store_size) == ir_no_alias) {
ir_node *mem = get_Store_mem(pred);
ir_nodeset_insert(&pi->user_mem, irn);
parallelize_store(pi, mem);
......@@ -145,16 +146,17 @@ static void parallelize_store(parallelize_info *pi, ir_node *irn)
return;
} else if (is_CopyB(irn)
&& get_CopyB_volatility(irn) == volatility_non_volatile) {
ir_type *org_type = pi->origin_ldst_type;
ir_type *org_objt = pi->origin_obj_type;
ir_node *org_ptr = pi->origin_ptr;
ir_type *copyB_type = get_CopyB_type(irn);
ir_type *org_type = pi->origin_type;
unsigned org_size = pi->origin_size;
ir_node *copyB_src = get_CopyB_src(irn);
ir_node *copyB_dst = get_CopyB_dst(irn);
if (get_alias_relation(org_ptr, org_type, org_objt,
copyB_src, copyB_type, copyB_type) == ir_no_alias &&
get_alias_relation(org_ptr, org_type, org_objt,
copyB_dst, copyB_type, copyB_type) == ir_no_alias) {
ir_type *copyB_type = get_CopyB_type(irn);
unsigned copyB_size = get_type_size_bytes(copyB_type);
if (get_alias_relation(org_ptr, org_type, org_size,
copyB_src, copyB_type, copyB_size) == ir_no_alias &&