diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-28 11:08:16 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-28 11:08:16 +0000 |
commit | 326a9581206b3b3b7d1b3f565b421fa493750944 (patch) | |
tree | 0557e52d0af921b06b93448b142c8e6390a24930 /gcc/cgraphbuild.c | |
parent | 77b5eabc32b82d9e2412e2156aa862a83a90dd73 (diff) | |
download | gcc-326a9581206b3b3b7d1b3f565b421fa493750944.tar.gz |
Bring from lto-branch:
2008-09-03 Doug Kwan <dougkwan@google.com>
* cgraphbuild.c (initialize_inline_failed): Use cgraph_inline_failed_t
enums instead of reason strings.
* cgraph.c (cgraph_create_edge): Same.
(cgraph_inline_failed_string): New function.
* cgraph.h (cgraph_inline_failed_t): New enum type.
(cgraph_inline_failed_string): New prototype.
(struct cgraph_edge): Change type of INLINED_FAILED from constant
char pointer to cgraph_inline_failed_t.
(cgraph_inline_p): Adjust prototype to use cgraph_inline_failed_t.
(cgraph_default_inline_p): Ditto.
* gcc/cgraphunit.c (cgraph_inline_p): Change type of parameter REASON
to cgraph_inline_failed_t pointer.
* cif-code.def: New file.
* ipa-inline.c (cgraph_mark_inline_edge): Use an enum instead of a
reason string.
(cgraph_check_inline_limits): Change type of REASON to pointer to
cgraph_inline_failed_t. Replace reason strings with enums.
(cgraph_default_inline_p): Ditto.
(cgraph_recursive_inlining_p): Ditto.
(update_caller_keys): Change type of FAILED_REASON to
cgraph_inline_failed_t.
(cgraph_set_inline_failed): Change type of REASON to pointer to
cgraph_inline_failed_t. Call cgraph_inline_failed_string to
convert enums to strings for text output.
(cgraph_decide_inlining_of_small_function): Change FAILED_REASON
to be of type cgraph_inline_failed_t. Replace reason strings with
enums. Call cgraph_inline_failed_string to covert enums
to strings for text output.
(cgraph_decide_inlining): Replace reason strings with enums.
(cgraph_decide_inlining_incrementally): Change type of FAILED_REASON
to cgraph_inline_failed_t type. Call cgraph_inline_failed_string
for text output.
* tree-inline.c (expand_call_inline): Change type of REASON
to cgraph_inline_failed_t. Replace reason strings with enums.
Call cgraph_inline_failed_string for text output.
* Makefile.in (CGRAPH_H): Add cif-code.def to dependencies.
(cgraph.o): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145176 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphbuild.c')
-rw-r--r-- | gcc/cgraphbuild.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c index 75db87544ce..f9bc6201afb 100644 --- a/gcc/cgraphbuild.c +++ b/gcc/cgraphbuild.c @@ -92,14 +92,13 @@ initialize_inline_failed (struct cgraph_node *node) gcc_assert (!e->callee->global.inlined_to); gcc_assert (e->inline_failed); if (node->local.redefined_extern_inline) - e->inline_failed = N_("redefined extern inline functions are not " - "considered for inlining"); + e->inline_failed = CIF_REDEFINED_EXTERN_INLINE; else if (!node->local.inlinable) - e->inline_failed = N_("function not inlinable"); + e->inline_failed = CIF_FUNCTION_NOT_INLINABLE; else if (gimple_call_cannot_inline_p (e->call_stmt)) - e->inline_failed = N_("mismatched arguments"); + e->inline_failed = CIF_MISMATCHED_ARGUMENTS; else - e->inline_failed = N_("function not considered for inlining"); + e->inline_failed = CIF_FUNCTION_NOT_CONSIDERED; } } |