if (TREE_CODE (dest) == SSA_NAME)
return true;
- if (call_may_clobber_ref_p (call, dest)
- || ref_maybe_used_by_stmt_p (call, dest))
+ if (call_may_clobber_ref_p (call, dest, false)
+ || ref_maybe_used_by_stmt_p (call, dest, false))
return false;
return true;
return true, otherwise return false. */
bool
-call_may_clobber_ref_p (gcall *call, tree ref)
+call_may_clobber_ref_p (gcall *call, tree ref, bool tbaa_p)
{
bool res;
ao_ref r;
ao_ref_init (&r, ref);
- res = call_may_clobber_ref_p_1 (call, &r, true);
+ res = call_may_clobber_ref_p_1 (call, &r, tbaa_p);
if (res)
++alias_stats.call_may_clobber_ref_p_may_alias;
else
extern bool stmt_may_clobber_global_p (gimple *);
extern bool stmt_may_clobber_ref_p (gimple *, tree, bool = true);
extern bool stmt_may_clobber_ref_p_1 (gimple *, ao_ref *, bool = true);
-extern bool call_may_clobber_ref_p (gcall *, tree);
+extern bool call_may_clobber_ref_p (gcall *, tree, bool = true);
extern bool call_may_clobber_ref_p_1 (gcall *, ao_ref *, bool = true);
extern bool stmt_kills_ref_p (gimple *, tree);
extern bool stmt_kills_ref_p (gimple *, ao_ref *);
if (valueized_anything)
{
bool res = call_may_clobber_ref_p_1 (as_a <gcall *> (def_stmt),
- ref);
+ ref, data->tbaa_p);
for (unsigned i = 0; i < gimple_call_num_args (def_stmt); ++i)
gimple_call_set_arg (def_stmt, i, oldargs[i]);
if (!res)
tree result_decl = DECL_RESULT (cfun->decl);
if (result_decl
&& may_be_aliased (result_decl)
- && ref_maybe_used_by_stmt_p (call, result_decl))
+ && ref_maybe_used_by_stmt_p (call, result_decl, false))
return;
/* We found the call, check whether it is suitable. */
if (TREE_CODE (var) != PARM_DECL
&& auto_var_in_fn_p (var, cfun->decl)
&& may_be_aliased (var)
- && (ref_maybe_used_by_stmt_p (call, var)
- || call_may_clobber_ref_p (call, var)))
+ && (ref_maybe_used_by_stmt_p (call, var, false)
+ || call_may_clobber_ref_p (call, var, false)))
{
if (!VAR_P (var))
{