aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-05-10 23:50:22 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2012-05-10 21:50:22 +0000
commitf1016df4031ad7fbbe23bc5b4d91c87d609d2bf7 (patch)
tree9d0df18d768a5c86cedd319356d9f1c290c37596 /gcc
parent57228a699857bbc47b6df2042f3fe77dc280876d (diff)
downloadgcc-f1016df4031ad7fbbe23bc5b4d91c87d609d2bf7.zip
gcc-f1016df4031ad7fbbe23bc5b4d91c87d609d2bf7.tar.gz
gcc-f1016df4031ad7fbbe23bc5b4d91c87d609d2bf7.tar.bz2
ipa-inline.c (update_all_callee_keys): Remove.
* ipa-inline.c (update_all_callee_keys): Remove. (inline_small_functions): Simplify priority updating. From-SVN: r187382
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-inline.c59
2 files changed, 7 insertions, 57 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b6508c3..8df98d7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2012-05-10 Jan Hubicka <jh@suse.cz>
+ * ipa-inline.c (update_all_callee_keys): Remove.
+ (inline_small_functions): Simplify priority updating.
+
+2012-05-10 Jan Hubicka <jh@suse.cz>
+
* ipa.c (symtab_remove_unreachable_nodes): Fix marking of clones.
2012-05-10 Jan Hubicka <jh@suse.cz>
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 78a8e47..c3482ed 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -1097,45 +1097,6 @@ update_callee_keys (fibheap_t heap, struct cgraph_node *node,
}
}
-/* Recompute heap nodes for each of caller edges of each of callees.
- Walk recursively into all inline clones. */
-
-static void
-update_all_callee_keys (fibheap_t heap, struct cgraph_node *node,
- bitmap updated_nodes)
-{
- struct cgraph_edge *e = node->callees;
- if (!e)
- return;
- while (true)
- if (!e->inline_failed && e->callee->callees)
- e = e->callee->callees;
- else
- {
- struct cgraph_node *callee = cgraph_function_or_thunk_node (e->callee,
- NULL);
-
- /* We inlined and thus callees might have different number of calls.
- Reset their caches */
- reset_node_growth_cache (callee);
- if (e->inline_failed)
- update_caller_keys (heap, callee, updated_nodes, e);
- if (e->next_callee)
- e = e->next_callee;
- else
- {
- do
- {
- if (e->caller == node)
- return;
- e = e->caller->callers;
- }
- while (!e->next_callee);
- e = e->next_callee;
- }
- }
-}
-
/* Enqueue all recursive calls from NODE into priority queue depending on
how likely we want to recursively inline the call. */
@@ -1488,7 +1449,7 @@ inline_small_functions (void)
at once. Consequently we need to update all callee keys. */
if (flag_indirect_inlining)
add_new_edges_to_heap (heap, new_indirect_edges);
- update_all_callee_keys (heap, where, updated_nodes);
+ update_callee_keys (heap, where, updated_nodes);
}
else
{
@@ -1527,18 +1488,7 @@ inline_small_functions (void)
reset_edge_caches (edge->callee);
reset_node_growth_cache (callee);
- /* We inlined last offline copy to the body. This might lead
- to callees of function having fewer call sites and thus they
- may need updating.
-
- FIXME: the callee size could also shrink because more information
- is propagated from caller. We don't track when this happen and
- thus we need to recompute everything all the time. Once this is
- solved, "|| 1" should go away. */
- if (callee->global.inlined_to || 1)
- update_all_callee_keys (heap, callee, updated_nodes);
- else
- update_callee_keys (heap, edge->callee, updated_nodes);
+ update_callee_keys (heap, edge->callee, updated_nodes);
}
where = edge->caller;
if (where->global.inlined_to)
@@ -1551,11 +1501,6 @@ inline_small_functions (void)
called by function we inlined (since number of it inlinable callers
might change). */
update_caller_keys (heap, where, updated_nodes, NULL);
-
- /* We removed one call of the function we just inlined. If offline
- copy is still needed, be sure to update the keys. */
- if (callee != where && !callee->global.inlined_to)
- update_caller_keys (heap, callee, updated_nodes, NULL);
bitmap_clear (updated_nodes);
if (dump_file)