From 18177c7e9bbdda7316b5a5fbb54737ba48757260 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Fri, 24 Aug 2007 09:44:04 +0000 Subject: Makefile.in (tree-inline.o): Add $(TARGET_H) and $(INTEGRATE_H) dependencies. 2007-08-24 Richard Guenther * 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 --- gcc/cp/tree.c | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) (limited to 'gcc/cp/tree.c') 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 -- cgit v1.1