summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-11 23:14:24 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-11 23:14:24 +0000
commit2de290970dc4faf5b5a35262f313e8bb21b0a4d4 (patch)
treef0954f84995a9bca9019f39db8adc5a403c44459 /gcc/cgraphunit.c
parentc7987dcf7ddaf3cf116ada582cbe7efc561b58ef (diff)
downloadgcc-2de290970dc4faf5b5a35262f313e8bb21b0a4d4.tar.gz
* cgraphunit.c (record_cdtor_fn): Declare all cdtors always inlined.
(cgraph_process_new_functions): Honor previous value of disregard_inline_limits. * ipa-inline.c (compute_inline_parameters): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127365 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 2120b6ba61b..f810c278b66 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -180,21 +180,26 @@ static GTY (()) tree static_dtors;
static void
record_cdtor_fn (tree fndecl)
{
- if (targetm.have_ctors_dtors)
+ struct cgraph_node *node;
+ if (targetm.have_ctors_dtors
+ || (!DECL_STATIC_CONSTRUCTOR (fndecl)
+ && !DECL_STATIC_DESTRUCTOR (fndecl)))
return;
if (DECL_STATIC_CONSTRUCTOR (fndecl))
{
static_ctors = tree_cons (NULL_TREE, fndecl, static_ctors);
DECL_STATIC_CONSTRUCTOR (fndecl) = 0;
- cgraph_mark_reachable_node (cgraph_node (fndecl));
}
if (DECL_STATIC_DESTRUCTOR (fndecl))
{
static_dtors = tree_cons (NULL_TREE, fndecl, static_dtors);
DECL_STATIC_DESTRUCTOR (fndecl) = 0;
- cgraph_mark_reachable_node (cgraph_node (fndecl));
}
+ DECL_INLINE (fndecl) = 1;
+ node = cgraph_node (fndecl);
+ node->local.disregard_inline_limits = 1;
+ cgraph_mark_reachable_node (node);
}
/* Synthesize a function which calls all the global ctors or global
@@ -376,7 +381,7 @@ cgraph_process_new_functions (void)
node->local.self_insns = estimate_num_insns (fndecl,
&eni_inlining_weights);
node->local.disregard_inline_limits
- = lang_hooks.tree_inlining.disregard_inline_limits (fndecl);
+ |= lang_hooks.tree_inlining.disregard_inline_limits (fndecl);
/* Inlining characteristics are maintained by the
cgraph_mark_inline. */
node->global.insns = node->local.self_insns;