diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-04 14:39:13 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-04 14:39:13 +0000 |
commit | 611e540558f5132bdcee510e0ac6004a5e943b46 (patch) | |
tree | b64167702ac199d1ec0b2c92b512d1cd185a82b7 /gcc/tree-inline.c | |
parent | a73c2b4b175eeb221b3822d993e41b1fa9fcedba (diff) | |
download | gcc-611e540558f5132bdcee510e0ac6004a5e943b46.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75391 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 48b59a41ed5..9d73be287ba 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1247,6 +1247,7 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data) splay_tree st; tree args; tree return_slot_addr; + const char *reason; /* See what we've got. */ id = (inline_data *) data; @@ -1327,12 +1328,13 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data) /* Don't try to inline functions that are not well-suited to inlining. */ - if (!DECL_SAVED_TREE (fn) || !cgraph_inline_p (id->current_decl, fn)) + if (!cgraph_inline_p (id->current_decl, fn, &reason)) { - if (warn_inline && DECL_INLINE (fn) && DECL_DECLARED_INLINE_P (fn) - && !DECL_IN_SYSTEM_HEADER (fn)) + if (warn_inline && DECL_DECLARED_INLINE_P (fn) + && !DECL_IN_SYSTEM_HEADER (fn) + && strlen (reason)) { - warning ("%Jinlining failed in call to '%F'", fn, fn); + warning ("%Jinlining failed in call to '%F': %s", fn, fn, reason); warning ("called from here"); } return NULL_TREE; |