#include "cgraph.h"
#include "varray.h"
#include "output.h"
+#include "intl.h"
/* Hash table used to convert declarations into nodes. */
struct cgraph_edge *edge = ggc_alloc (sizeof (struct cgraph_edge));
struct cgraph_edge *edge2;
- edge->inline_call = false;
+ if (!DECL_SAVED_TREE (callee->decl))
+ edge->inline_failed = N_("function body not available");
+ else if (callee->local.redefined_extern_inline)
+ edge->inline_failed = N_("redefined extern inline functions are not "
+ "considered for inlining");
+ else if (callee->local.inlinable)
+ edge->inline_failed = N_("function not considered for inlining");
+ else
+ edge->inline_failed = N_("function not inlinable");
+
/* At the moment we don't associate calls with specific CALL_EXPRs
as we probably ought to, so we must preserve inline_call flags to
be the same in all copies of the same edge. */
for (edge2 = caller->callees; edge2; edge2 = edge2->next_callee)
if (edge2->callee == callee)
{
- edge->inline_call = edge2->inline_call;
+ edge->inline_failed = edge2->inline_failed;
break;
}
if (node->previous)
node->previous->next = node->next;
else
- cgraph_nodes = node;
+ cgraph_nodes = node->next;
if (node->next)
node->next->previous = node->previous;
DECL_SAVED_TREE (node->decl) = NULL;
+ DECL_SAVED_INSNS (node->decl) = NULL;
+ DECL_ARGUMENTS (node->decl) = NULL;
+ DECL_INITIAL (node->decl) = error_mark_node;
slot =
htab_find_slot_with_hash (cgraph_hash, DECL_ASSEMBLER_NAME (node->decl),
IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME
for (edge = node->callers; edge; edge = edge->next_caller)
{
fprintf (f, "%s ", cgraph_node_name (edge->caller));
- if (edge->inline_call)
+ if (!edge->inline_failed)
fprintf(f, "(inlined) ");
}
for (edge = node->callees; edge; edge = edge->next_callee)
{
fprintf (f, "%s ", cgraph_node_name (edge->callee));
- if (edge->inline_call)
+ if (!edge->inline_failed)
fprintf(f, "(inlined) ");
}
fprintf (f, "\n");