return;
}
t = TREE_OPERAND (caller_lat->constant, 0);
- t = build_ref_for_offset (t, jfunc->value.ancestor.offset,
+ t = build_ref_for_offset (EXPR_LOCATION (t), t,
+ jfunc->value.ancestor.offset,
jfunc->value.ancestor.type, NULL, false);
lat->constant = build_fold_addr_expr (t);
}
if (cgraph_only_called_directly_p (node) || !node->analyzed)
return false;
+ /* When function address is taken, we are pretty sure it will be called in hidden way. */
+ if (node->address_taken)
+ {
+ if (dump_file)
+ fprintf (dump_file, "Not considering %s for cloning; address is taken.\n",
+ cgraph_node_name (node));
+ return false;
+ }
+
if (cgraph_function_body_availability (node) <= AVAIL_OVERWRITABLE)
{
if (dump_file)
if (ipa_is_called_with_var_arguments (info))
type = IPA_BOTTOM;
- else if (cgraph_only_called_directly_p (node))
+ else if (node->local.local)
type = IPA_TOP;
/* When cloning is allowed, we can assume that externally visible functions
are not called. We will compensate this by cloning later. */