From: Jan Hubicka Date: Sat, 26 Jul 2008 10:03:01 +0000 (+0200) Subject: cgraph.c (cgraph_function_possibly_inlined_p): Do not rely on DECL_INLINE. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c37f4ba497bbe33b11c2cf9fa33c077b22218168;p=gcc.git cgraph.c (cgraph_function_possibly_inlined_p): Do not rely on DECL_INLINE. * cgraph.c (cgraph_function_possibly_inlined_p): Do not rely on DECL_INLINE. * cgraphunit.c (record_cdtor_fn): Do not initialize DECL_INLINE (cgraph_preserve_function_body_p): Do not rely on DECL_INLINE. * dojump.c (clear_pending_stack_adjust): Likewise. * print-tree.c (print_node): Ignore DECL_INLINE. * tree-inline.c (inlinable_function_p): Likewise. From-SVN: r138165 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ed4a31c36be..a461d7b1c3c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2008-07-25 Jan Hubicka + + * cgraph.c (cgraph_function_possibly_inlined_p): Do not rely on DECL_INLINE. + * cgraphunit.c (record_cdtor_fn): Do not initialize DECL_INLINE + (cgraph_preserve_function_body_p): Do not rely on DECL_INLINE. + * dojump.c (clear_pending_stack_adjust): Likewise. + * print-tree.c (print_node): Ignore DECL_INLINE. + * tree-inline.c (inlinable_function_p): Likewise. + 2008-07-25 Michael Meissner * doc/extend.texi (hot attribute): Document that the hot attribute diff --git a/gcc/cgraph.c b/gcc/cgraph.c index c4ad33ef4b5..b88ab68f056 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1140,7 +1140,7 @@ bool cgraph_function_possibly_inlined_p (tree decl) { if (!cgraph_global_info_ready) - return (DECL_INLINE (decl) && !flag_really_no_inline); + return !DECL_UNINLINABLE (decl) && !flag_really_no_inline; return DECL_POSSIBLY_INLINED (decl); } diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 674d6da012f..9f4f87c2451 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -172,7 +172,6 @@ record_cdtor_fn (tree fndecl) VEC_safe_push (tree, gc, static_dtors, fndecl); DECL_STATIC_DESTRUCTOR (fndecl) = 0; } - DECL_INLINE (fndecl) = 1; node = cgraph_node (fndecl); node->local.disregard_inline_limits = 1; cgraph_mark_reachable_node (node); @@ -1211,10 +1210,8 @@ bool cgraph_preserve_function_body_p (tree decl) { struct cgraph_node *node; - if (!cgraph_global_info_ready) - return (flag_really_no_inline - ? DECL_DISREGARD_INLINE_LIMITS (decl) - : DECL_INLINE (decl)); + + gcc_assert (cgraph_global_info_ready); /* Look if there is any clone around. */ for (node = cgraph_node (decl); node; node = node->next_clone) if (node->global.inlined_to) diff --git a/gcc/dojump.c b/gcc/dojump.c index 43373481955..fb8d139b111 100644 --- a/gcc/dojump.c +++ b/gcc/dojump.c @@ -71,8 +71,7 @@ clear_pending_stack_adjust (void) { if (optimize > 0 && (! flag_omit_frame_pointer || cfun->calls_alloca) - && EXIT_IGNORE_STACK - && ! (DECL_INLINE (current_function_decl) && ! flag_no_inline)) + && EXIT_IGNORE_STACK) discard_pending_stack_adjust (); } diff --git a/gcc/print-tree.c b/gcc/print-tree.c index 09ca2849a7e..ed31861624a 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -375,8 +375,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent) if (TREE_CODE (node) == FUNCTION_DECL && DECL_FUNCTION_SPECIFIC_OPTIMIZATION (node)) fputs (" function-specific-opt", file); - if (TREE_CODE (node) == FUNCTION_DECL && DECL_INLINE (node)) - fputs (DECL_DECLARED_INLINE_P (node) ? " inline" : " autoinline", file); + if (TREE_CODE (node) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (node)) + fputs (" autoinline", file); if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node)) fputs (" built-in", file); if (TREE_CODE (node) == FUNCTION_DECL && DECL_NO_STATIC_CHAIN (node)) diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 5eff3caaa18..103f504c2d9 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2058,7 +2058,6 @@ inlinable_function_p (tree fn) /* We only warn for functions declared `inline' by the user. */ do_warning = (warn_inline - && DECL_INLINE (fn) && DECL_DECLARED_INLINE_P (fn) && !DECL_IN_SYSTEM_HEADER (fn));