* cgraph.h (expand_thunk): New argument added.
(address_taken_from_non_vtable_p): New global function.
* ipa-visibility.c (address_taken_from_non_vtable_p): Likewise.
* cgraphclones.c (duplicate_thunk_for_node): Argument added to call.
* cgraphunit.c (analyze_function): Likewise.
(assemble_thunks_and_aliases): Argument added to call.
(expand_thunk): New argument forces to produce GIMPLE thunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211218
138bc75d-0d04-0410-961f-
82ee72b054a4
2014-06-04 Martin Liska <mliska@suse.cz>
+ * cgraph.h (expand_thunk): New argument added.
+ (address_taken_from_non_vtable_p): New global function.
+ * ipa-visibility.c (address_taken_from_non_vtable_p): Likewise.
+ * cgraphclones.c (duplicate_thunk_for_node): Argument added to call.
+ * cgraphunit.c (analyze_function): Likewise.
+ (assemble_thunks_and_aliases): Argument added to call.
+ (expand_thunk): New argument forces to produce GIMPLE thunk.
+
+2014-06-04 Martin Liska <mliska@suse.cz>
+
* coverage.h (coverage_compute_cfg_checksum): Argument added.
* coverage.c (coverage_compute_cfg_checksum): Likewise.
* profile.c (branch_prob): Likewise.
IN_SSA is true if the gimple is in SSA. */
basic_block init_lowered_empty_function (tree, bool);
void cgraph_reset_node (struct cgraph_node *);
-bool expand_thunk (struct cgraph_node *, bool);
+bool expand_thunk (struct cgraph_node *, bool, bool);
/* In cgraphclones.c */
/* In ipa-visibility.c */
bool cgraph_local_node_p (struct cgraph_node *);
+bool address_taken_from_non_vtable_p (symtab_node *node);
/* In predict.c */
CGRAPH_FREQ_BASE);
e->call_stmt_cannot_inline_p = true;
cgraph_call_edge_duplication_hooks (thunk->callees, e);
- if (!expand_thunk (new_thunk, false))
+ if (!expand_thunk (new_thunk, false, false))
new_thunk->analyzed = true;
cgraph_call_node_duplication_hooks (thunk, new_thunk);
return new_thunk;
{
cgraph_create_edge (node, cgraph_get_node (node->thunk.alias),
NULL, 0, CGRAPH_FREQ_BASE);
- if (!expand_thunk (node, false))
+ if (!expand_thunk (node, false, false))
{
node->thunk.alias = NULL;
node->analyzed = true;
}
/* Expand thunk NODE to gimple if possible.
+ When FORCE_GIMPLE_THUNK is true, gimple thunk is created and
+ no assembler is produced.
When OUTPUT_ASM_THUNK is true, also produce assembler for
thunks that are not lowered. */
bool
-expand_thunk (struct cgraph_node *node, bool output_asm_thunks)
+expand_thunk (struct cgraph_node *node, bool output_asm_thunks, bool force_gimple_thunk)
{
bool this_adjusting = node->thunk.this_adjusting;
HOST_WIDE_INT fixed_offset = node->thunk.fixed_offset;
tree a;
- if (this_adjusting
+ if (!force_gimple_thunk && this_adjusting
&& targetm.asm_out.can_output_mi_thunk (thunk_fndecl, fixed_offset,
virtual_value, alias))
{
e = e->next_caller;
assemble_thunks_and_aliases (thunk);
- expand_thunk (thunk, true);
+ expand_thunk (thunk, true, false);
}
else
e = e->next_caller;
}
/* Return true when there is a reference to node and it is not vtable. */
-static bool
+bool
address_taken_from_non_vtable_p (symtab_node *node)
{
int i;