diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-13 01:35:27 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-13 01:35:27 +0000 |
commit | d731003eec26e8a70dd628d2f472ee3258d2163c (patch) | |
tree | 45863b0867b1a5dca9004db917fa2c41f48f77a5 /gcc/cgraphunit.c | |
parent | 6c04b2f1c86c9d25617cbce096427cd8914f88ca (diff) | |
download | gcc-d731003eec26e8a70dd628d2f472ee3258d2163c.tar.gz |
* cgraphunit.c (cgraph_optimize_function): Always do
optimize_inline_calls when there is always_inline callee.
(cgraph_decide_inlining): Fix formating.
* tree-inline.c (inlinable_function_p): Do sorry for alwaysinline
functions.
(expand_call_inline): Likewise.
* toplev.h (sorry): Fix prototype.
* gcc.dg/always_inline.c: New test.
* gcc.dg/debug/20031231-1.c: Fix.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75781 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 8b17d3e7b65..cf7069b1b08 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -481,7 +481,10 @@ cgraph_optimize_function (struct cgraph_node *node) struct cgraph_edge *e; for (e = node->callees; e; e = e->next_callee) - if (!e->inline_failed || warn_inline) + if (!e->inline_failed || warn_inline + || (DECL_DECLARED_INLINE_P (e->callee->decl) + && lookup_attribute ("always_inline", + DECL_ATTRIBUTES (e->callee->decl)))) break; if (e) optimize_inline_calls (decl); @@ -1178,10 +1181,10 @@ cgraph_decide_inlining (void) cgraph_node_name (node->callees->caller), node->callees->caller->global.insns); } - if (cgraph_dump_file && node->global.cloned_times > 0) - fprintf (cgraph_dump_file, - " Inlined %i times for a net change of %+i insns.\n", - node->global.cloned_times, overall_insns - old_insns); + if (cgraph_dump_file && node->global.cloned_times > 0) + fprintf (cgraph_dump_file, + " Inlined %i times for a net change of %+i insns.\n", + node->global.cloned_times, overall_insns - old_insns); for (y = 0; y < ninlined; y++) inlined[y]->output = 0, node->aux = 0; } |