+2015-03-03 Jan Hubicka <hubicka@ucw.cz>
+
+ * tree-sra.c (convert_callers): Use call_for_symbol_and_aliases.
+ (struct ipa_sra_check_caller_data): Add has_thunk field.
+ (ipa_sra_check_caller): Check for thunk.
+ (ipa_sra_preliminary_function_checks): Give up on function with
+ thunks.
+ (ipa_early_sra): Use call_for_symbol_and_aliases.
+
2015-03-03 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/65249
{
basic_block this_block;
- node->call_for_symbol_thunks_and_aliases (convert_callers_for_node,
- &adjustments, false);
+ node->call_for_symbol_and_aliases (convert_callers_for_node,
+ &adjustments, false);
if (!encountered_recursive_call)
return;
{
bool has_callers;
bool bad_arg_alignment;
+ bool has_thunk;
};
/* If NODE has a caller, mark that fact in DATA which is pointer to
for (cgraph_edge *cs = node->callers; cs; cs = cs->next_caller)
{
+ if (cs->caller->thunk.thunk_p)
+ {
+ iscc->has_thunk = true;
+ return true;
+ }
gimple call_stmt = cs->call_stmt;
unsigned count = gimple_call_num_args (call_stmt);
for (unsigned i = 0; i < count; i++)
struct ipa_sra_check_caller_data iscc;
memset (&iscc, 0, sizeof(iscc));
- node->call_for_symbol_thunks_and_aliases (ipa_sra_check_caller, &iscc, true);
+ node->call_for_symbol_and_aliases (ipa_sra_check_caller, &iscc, true);
if (!iscc.has_callers)
{
if (dump_file)
return false;
}
+ if (iscc.has_thunk)
+ {
+ if (dump_file)
+ fprintf (dump_file,
+ "A has thunk.\n");
+ return false;
+ }
+
return true;
}
goto simple_out;
}
- if (node->call_for_symbol_thunks_and_aliases
+ if (node->call_for_symbol_and_aliases
(some_callers_have_mismatched_arguments_p, NULL, true))
{
if (dump_file)
goto simple_out;
}
- if (node->call_for_symbol_thunks_and_aliases
+ if (node->call_for_symbol_and_aliases
(some_callers_have_no_vuse_p, NULL, true))
{
if (dump_file)