summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-01-04 15:39:13 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2004-01-04 14:39:13 +0000
commitdc0bfe6a357714f761a6b4326dc7a3cb03c79d8c (patch)
treeb64167702ac199d1ec0b2c92b512d1cd185a82b7 /gcc/cgraph.c
parente42870dffe41cff30755a74cbe162be96f742442 (diff)
downloadgcc-dc0bfe6a357714f761a6b4326dc7a3cb03c79d8c.tar.gz
Makefile.in (cgraph.o, [...]): Add intl.h dependency.
* Makefile.in (cgraph.o, cgraphunit.o): Add intl.h dependency. * cgraph.c (create_edge, dump_cgraph): Update to use inline_failed * cgraph.h (cgraph_edge): Replace inline_call by inline_failed (cgraph_inline_p): Add extra argument reason. * cgraphunit.c: Minor formating fixes. cgraph_first_inlined_callee): New functions. (record_call_1): Record builtins too. (cgraph_analyze_function): Update inline_failed messages. (cgraph_mark_functions_to_output, cgraph_expand_function, cgraph_inlined_into, cgraph_inlined_callees, cgraph_estimate_growth): Update to use inline_failed. (cgraph_check_inline_limits): Likewise; Add argument reason. (cgraph_set_inline_failed): New static function. (cgraph_decide_inlining_of_small_function, cgraph_decide_inlining): Set reasons. (cgraph_inline_p): Add new argument reason. * tree-inline.c (expand_call_inline): Update warning. From-SVN: r75391
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 26cbd27100c..73a420e6e7c 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -34,6 +34,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "cgraph.h"
#include "varray.h"
#include "output.h"
+#include "intl.h"
/* Hash table used to convert declarations into nodes. */
@@ -156,7 +157,13 @@ create_edge (struct cgraph_node *caller, struct cgraph_node *callee)
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.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. */
@@ -164,7 +171,7 @@ create_edge (struct cgraph_node *caller, struct cgraph_node *callee)
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;
}
@@ -381,7 +388,7 @@ dump_cgraph (FILE *f)
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) ");
}
@@ -389,7 +396,7 @@ dump_cgraph (FILE *f)
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");