diff options
author | Jan Hubicka <jh@suse.cz> | 2004-01-13 02:35:27 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2004-01-13 01:35:27 +0000 |
commit | 2d3270129fac84d3d3420a1da10330404ccadc2a (patch) | |
tree | 45863b0867b1a5dca9004db917fa2c41f48f77a5 /gcc/cgraphunit.c | |
parent | 04cc79bb8928ff2c97bef9df08dc252eecdc9845 (diff) | |
download | gcc-2d3270129fac84d3d3420a1da10330404ccadc2a.tar.gz |
cgraphunit.c (cgraph_optimize_function): Always do optimize_inline_calls when there is always_inline callee.
* 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.
From-SVN: r75781
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; } |