diff options
author | Richard Guenther <rguenther@suse.de> | 2007-08-24 09:44:04 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-08-24 09:44:04 +0000 |
commit | 18177c7e9bbdda7316b5a5fbb54737ba48757260 (patch) | |
tree | 5270dcc8ebfd36c501d57a40ccebba1e3b65b19e /gcc/cp/tree.c | |
parent | 9c219b9bb34eafa7d9f42e3ffc5e73f77e397a75 (diff) | |
download | gcc-18177c7e9bbdda7316b5a5fbb54737ba48757260.zip gcc-18177c7e9bbdda7316b5a5fbb54737ba48757260.tar.gz gcc-18177c7e9bbdda7316b5a5fbb54737ba48757260.tar.bz2 |
Makefile.in (tree-inline.o): Add $(TARGET_H) and $(INTEGRATE_H) dependencies.
2007-08-24 Richard Guenther <rguenther@suse.de>
* Makefile.in (tree-inline.o): Add $(TARGET_H) and $(INTEGRATE_H)
dependencies.
* c-objc-common.c (c_cannot_inline_tree_fn): Remove.
* langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Likewise.
* tree-inline.c (inlinable_function_p): Fold in common parts of
the cannot_inline_tree_fn langhook.
* langhooks-def.h (lhd_tree_inlining_cannot_inline_tree_fn): Remove.
(LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN): Likewise.
(LANG_HOOKS_TREE_INLINING_INITIALIZER): Remove initializer for
cannot_inline_tree_fn langhook.
* langhooks.h (struct lang_hooks_for_tree_inlining): Remove
cannot_inline_tree_fn member.
cp/
* tree.c (cp_cannot_inline_tree_fn): Remove.
* cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
* cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
Remove define.
From-SVN: r127763
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 9c80fba..c77cc87 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2398,58 +2398,6 @@ cp_walk_subtrees (tree *tp, int *walk_subtrees_p, walk_tree_fn func, #undef WALK_SUBTREE } -/* Decide whether there are language-specific reasons to not inline a - function as a tree. */ - -int -cp_cannot_inline_tree_fn (tree* fnp) -{ - tree fn = *fnp; - - /* We can inline a template instantiation only if it's fully - instantiated. */ - if (DECL_TEMPLATE_INFO (fn) - && TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn))) - { - /* Don't instantiate functions that are not going to be - inlined. */ - if (!DECL_INLINE (DECL_TEMPLATE_RESULT - (template_for_substitution (fn)))) - return 1; - - fn = *fnp = instantiate_decl (fn, /*defer_ok=*/0, /*undefined_ok=*/0); - - if (TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn))) - return 1; - } - - if (flag_really_no_inline - && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL) - return 1; - - /* Don't auto-inline functions that might be replaced at link-time - with an alternative definition. */ - if (!DECL_DECLARED_INLINE_P (fn) && DECL_REPLACEABLE_P (fn)) - { - DECL_UNINLINABLE (fn) = 1; - return 1; - } - - if (varargs_function_p (fn)) - { - DECL_UNINLINABLE (fn) = 1; - return 1; - } - - if (! function_attribute_inlinable_p (fn)) - { - DECL_UNINLINABLE (fn) = 1; - return 1; - } - - return 0; -} - /* Like save_expr, but for C++. */ tree |