return NULL_TREE;
}
-/* Give initial reasons why inlining would fail on all calls from
- NODE. Those get either nullified or usually overwritten by more precise
- reason later. */
-
-static void
-initialize_inline_failed (struct cgraph_node *node)
-{
- struct cgraph_edge *e;
-
- for (e = node->callers; e; e = e->next_caller)
- {
- gcc_assert (!e->callee->global.inlined_to);
- gcc_assert (e->inline_failed);
- if (node->local.redefined_extern_inline)
- e->inline_failed = CIF_REDEFINED_EXTERN_INLINE;
- else if (!node->local.inlinable)
- e->inline_failed = CIF_FUNCTION_NOT_INLINABLE;
- else if (gimple_call_cannot_inline_p (e->call_stmt))
- e->inline_failed = CIF_MISMATCHED_ARGUMENTS;
- else
- e->inline_failed = CIF_FUNCTION_NOT_CONSIDERED;
- }
-}
-
/* Computes the frequency of the call statement so that it can be stored in
cgraph_edge. BB is the basic block of the call statement. */
int
}
pointer_set_destroy (visited_nodes);
- initialize_inline_failed (node);
return 0;
}
bb->loop_depth);
}
- initialize_inline_failed (node);
gcc_assert (!node->global.inlined_to);
+
return 0;
}
0, /* todo_flags_finish */
}
};
+
+
+static unsigned int
+remove_cgraph_callee_edges (void)
+{
+ cgraph_node_remove_callees (cgraph_node (current_function_decl));
+ return 0;
+}
+
+struct gimple_opt_pass pass_remove_cgraph_callee_edges =
+{
+ {
+ GIMPLE_PASS,
+ NULL, /* name */
+ NULL, /* gate */
+ remove_cgraph_callee_edges, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ 0, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0, /* todo_flags_finish */
+ }
+};