From 993555181042e01fcdb573a44f4c787a3e50e25a Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 29 Jul 2008 12:49:30 +0200 Subject: [PATCH] optimize.c (maybe_clone_body): Remove DECL_INLINE. * optimize.c (maybe_clone_body): Remove DECL_INLINE. * decl.c (duplicate_decls): Likewise. (grokfndecl): Likewise. (start_method): Likewise. * method.c (make_thunk, make_alias_for, implicitly_declare_fn): Likewise. * pt.c (register_specialization, regenerate_decl_from_template): Likewise. * decl2.c (grokfield): Likewise. From-SVN: r138236 --- gcc/cp/ChangeLog | 12 ++++++++++++ gcc/cp/decl.c | 26 ++------------------------ gcc/cp/decl2.c | 2 -- gcc/cp/method.c | 3 --- gcc/cp/optimize.c | 1 - gcc/cp/pt.c | 10 ++-------- 6 files changed, 16 insertions(+), 38 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b44108402d4..6fe401a759b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,15 @@ +2008-07-29 Jan Hubicka + + * optimize.c (maybe_clone_body): Remove DECL_INLINE. + * decl.c (duplicate_decls): Likewise. + (grokfndecl): Likewise. + (start_method): Likewise. + * method.c (make_thunk, make_alias_for, implicitly_declare_fn): + Likewise. + * pt.c (register_specialization, regenerate_decl_from_template): + Likewise. + * decl2.c (grokfield): Likewise. + 2008-07-29 Manuel Lopez-Ibanez PR 34985 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 248b9b71a05..1ed98eee4ff 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -1652,15 +1652,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) && DECL_INITIAL (new_result)) { if (DECL_INITIAL (old_result)) - { - DECL_INLINE (old_result) = 0; - DECL_UNINLINABLE (old_result) = 1; - } + DECL_UNINLINABLE (old_result) = 1; else - { - DECL_INLINE (old_result) = DECL_INLINE (new_result); - DECL_UNINLINABLE (old_result) = DECL_UNINLINABLE (new_result); - } + DECL_UNINLINABLE (old_result) = DECL_UNINLINABLE (new_result); DECL_EXTERNAL (old_result) = DECL_EXTERNAL (new_result); DECL_NOT_REALLY_EXTERN (old_result) = DECL_NOT_REALLY_EXTERN (new_result); @@ -1674,8 +1668,6 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) } else { - DECL_INLINE (old_result) - |= DECL_INLINE (new_result); DECL_DECLARED_INLINE_P (old_result) |= DECL_DECLARED_INLINE_P (new_result); DECL_DISREGARD_INLINE_LIMITS (old_result) @@ -1949,7 +1941,6 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) /* Never inline re-defined extern inline functions. FIXME: this could be better handled by keeping both function as separate declarations. */ - DECL_INLINE (newdecl) = 0; DECL_UNINLINABLE (newdecl) = 1; } else @@ -1959,12 +1950,6 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) DECL_DECLARED_INLINE_P (newdecl) |= DECL_DECLARED_INLINE_P (olddecl); - /* If either decl says `inline', this fn is inline, unless - its definition was passed already. */ - if (DECL_INLINE (newdecl) && DECL_INITIAL (olddecl) == NULL_TREE) - DECL_INLINE (olddecl) = 1; - DECL_INLINE (newdecl) = DECL_INLINE (olddecl); - DECL_UNINLINABLE (newdecl) = DECL_UNINLINABLE (olddecl) = (DECL_UNINLINABLE (newdecl) || DECL_UNINLINABLE (olddecl)); @@ -6649,11 +6634,6 @@ grokfndecl (tree ctype, /* If the declaration was declared inline, mark it as such. */ if (inlinep) DECL_DECLARED_INLINE_P (decl) = 1; - /* We inline functions that are explicitly declared inline, or, when - the user explicitly asks us to, all functions. */ - if (DECL_DECLARED_INLINE_P (decl) - || (!DECL_INLINE (decl) && funcdef_flag)) - DECL_INLINE (decl) = 1; DECL_EXTERNAL (decl) = 1; if (quals && TREE_CODE (type) == FUNCTION_TYPE) @@ -12138,8 +12118,6 @@ start_method (cp_decl_specifier_seq *declspecs, check_template_shadow (fndecl); DECL_DECLARED_INLINE_P (fndecl) = 1; - if (flag_default_inline) - DECL_INLINE (fndecl) = 1; /* We process method specializations in finish_struct_1. */ if (processing_template_decl && !DECL_TEMPLATE_SPECIALIZATION (fndecl)) diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 20b0826faf2..05f75f7de84 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -837,7 +837,6 @@ grokfield (const cp_declarator *declarator, DECL_DEFAULTED_FN (value) = 1; DECL_INITIALIZED_IN_CLASS_P (value) = 1; DECL_DECLARED_INLINE_P (value) = 1; - DECL_INLINE (value) = 1; } } else if (TREE_CODE (TREE_TYPE (value)) == METHOD_TYPE) @@ -2702,7 +2701,6 @@ start_static_storage_duration_function (unsigned count) type); TREE_PUBLIC (ssdf_decl) = 0; DECL_ARTIFICIAL (ssdf_decl) = 1; - DECL_INLINE (ssdf_decl) = 1; /* Put this function in the list of functions to be called from the static constructors and destructors. */ diff --git a/gcc/cp/method.c b/gcc/cp/method.c index f3d23eba23d..b215d2a3936 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -155,7 +155,6 @@ make_thunk (tree function, bool this_adjusting, DECL_NO_STATIC_CHAIN (thunk) = 1; /* The THUNK is not a pending inline, even if the FUNCTION is. */ DECL_PENDING_INLINE_P (thunk) = 0; - DECL_INLINE (thunk) = 0; DECL_DECLARED_INLINE_P (thunk) = 0; /* Nor has it been deferred. */ DECL_DEFERRED_FN (thunk) = 0; @@ -281,7 +280,6 @@ make_alias_for (tree function, tree newid) DECL_ARTIFICIAL (alias) = 1; DECL_NO_STATIC_CHAIN (alias) = 1; DECL_PENDING_INLINE_P (alias) = 0; - DECL_INLINE (alias) = 0; DECL_DECLARED_INLINE_P (alias) = 0; DECL_DEFERRED_FN (alias) = 0; DECL_USE_TEMPLATE (alias) = 0; @@ -1111,7 +1109,6 @@ implicitly_declare_fn (special_function_kind kind, tree type, bool const_p) DECL_DEFAULTED_FN (fn) = 1; DECL_NOT_REALLY_EXTERN (fn) = 1; DECL_DECLARED_INLINE_P (fn) = 1; - DECL_INLINE (fn) = 1; gcc_assert (!TREE_USED (fn)); /* Restore PROCESSING_TEMPLATE_DECL. */ diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index ed43b435831..8c7b9e82ccb 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -138,7 +138,6 @@ maybe_clone_body (tree fn) /* Update CLONE's source position information to match FN's. */ DECL_SOURCE_LOCATION (clone) = DECL_SOURCE_LOCATION (fn); - DECL_INLINE (clone) = DECL_INLINE (fn); DECL_DECLARED_INLINE_P (clone) = DECL_DECLARED_INLINE_P (fn); DECL_COMDAT (clone) = DECL_COMDAT (fn); DECL_WEAK (clone) = DECL_WEAK (fn); diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index b47ee5e6b3f..04fd29bb009 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1289,12 +1289,8 @@ register_specialization (tree spec, tree tmpl, tree args, bool is_friend) to the primary function; now copy the inline bits to the various clones. */ FOR_EACH_CLONE (clone, fn) - { - DECL_DECLARED_INLINE_P (clone) - = DECL_DECLARED_INLINE_P (fn); - DECL_INLINE (clone) - = DECL_INLINE (fn); - } + DECL_DECLARED_INLINE_P (clone) + = DECL_DECLARED_INLINE_P (fn); check_specialization_namespace (fn); return fn; @@ -14921,8 +14917,6 @@ regenerate_decl_from_template (tree decl, tree tmpl) if (DECL_DECLARED_INLINE_P (code_pattern) && !DECL_DECLARED_INLINE_P (decl)) DECL_DECLARED_INLINE_P (decl) = 1; - if (DECL_INLINE (code_pattern) && !DECL_INLINE (decl)) - DECL_INLINE (decl) = 1; } else if (TREE_CODE (decl) == VAR_DECL) DECL_INITIAL (decl) = -- 2.30.2