summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-21 09:08:08 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-21 09:08:08 +0000
commitfbcea800f105bb3e57bcbab845d2c95032467590 (patch)
tree2e52f5a9248b3cd9cae070ab471084c3c15de0f2 /gcc/ipa-inline.c
parentace7bf06484d2ef5ad7282097f908c23e7a2af7a (diff)
downloadgcc-fbcea800f105bb3e57bcbab845d2c95032467590.tar.gz
* ipa-inline.c (can_inline_edge_p): Pass caller info to
ultiimate_alias_target. (update_callee_keys): Likewise. (lookup_recursive_calls): Likewise. (speculation_useful_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235319 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 55899ef1730..b855fc7f07c 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -313,9 +313,9 @@ can_inline_edge_p (struct cgraph_edge *e, bool report,
bool inlinable = true;
enum availability avail;
- cgraph_node *callee = e->callee->ultimate_alias_target (&avail);
cgraph_node *caller = e->caller->global.inlined_to
? e->caller->global.inlined_to : e->caller;
+ cgraph_node *callee = e->callee->ultimate_alias_target (&avail, caller);
tree caller_tree = DECL_FUNCTION_SPECIFIC_OPTIMIZATION (caller->decl);
tree callee_tree
= callee ? DECL_FUNCTION_SPECIFIC_OPTIMIZATION (callee->decl) : NULL;
@@ -1382,7 +1382,7 @@ update_callee_keys (edge_heap_t *heap, struct cgraph_node *node,
growth chould have just increased and consequentely badness metric
don't need updating. */
if (e->inline_failed
- && (callee = e->callee->ultimate_alias_target (&avail))
+ && (callee = e->callee->ultimate_alias_target (&avail, e->caller))
&& inline_summaries->get (callee)->inlinable
&& avail >= AVAIL_AVAILABLE
&& !bitmap_bit_p (updated_nodes, callee->uid))
@@ -1425,7 +1425,7 @@ lookup_recursive_calls (struct cgraph_node *node, struct cgraph_node *where,
for (e = where->callees; e; e = e->next_callee)
if (e->callee == node
- || (e->callee->ultimate_alias_target (&avail) == node
+ || (e->callee->ultimate_alias_target (&avail, e->caller) == node
&& avail > AVAIL_INTERPOSABLE))
{
/* When profile feedback is available, prioritize by expected number
@@ -1624,7 +1624,8 @@ bool
speculation_useful_p (struct cgraph_edge *e, bool anticipate_inlining)
{
enum availability avail;
- struct cgraph_node *target = e->callee->ultimate_alias_target (&avail);
+ struct cgraph_node *target = e->callee->ultimate_alias_target (&avail,
+ e->caller);
struct cgraph_edge *direct, *indirect;
struct ipa_ref *ref;