diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2002-02-22 00:09:04 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2002-02-22 00:09:04 +0000 |
commit | 6aa77e6c394b8d61c25d146e7d106f4ddf17ca54 (patch) | |
tree | 81ecf94407355c68f26f5bc1ca604c5ff588e9da /gcc/c-objc-common.c | |
parent | c410d49e434d06e93c9163eda0a26891e6116a7e (diff) | |
download | gcc-6aa77e6c394b8d61c25d146e7d106f4ddf17ca54.zip gcc-6aa77e6c394b8d61c25d146e7d106f4ddf17ca54.tar.gz gcc-6aa77e6c394b8d61c25d146e7d106f4ddf17ca54.tar.bz2 |
attr-alwaysinline.c: New.
2002-02-21 Aldy Hernandez <aldyh@redhat.com>
* gcc.dg/attr-alwaysinline.c: New.
* c-common.c (c_common_post_options): Set inline trees by
default.
* doc/extend.texi (Function Attributes): Document always_inline
attribute.
Update documentation about inlining when not optimizing.
* cp/decl.c (duplicate_decls): Merge always_inline attribute.
* cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
unless DECL_ALWAYS_INLINE.
* c-objc-common.c (c_cannot_inline_tree_fn): Do not inline at -O0
unless DECL_ALWAYS_INLINE.
(c_disregard_inline_limits): Disregard if always_inline set.
* langhooks.c (lhd_tree_inlining_disregard_inline_limits):
Disregard if always_inline set.
(lhd_tree_inlining_cannot_inline_tree_fn): Do not inline at -O0
unless DECL_ALWAYS_INLINE.
* attribs.c (handle_always_inline_attribute): New.
(c_common_attribute_table): Add always_inline.
* config/rs6000/altivec.h: Add prototypes for builtins
requiring the always_inline attribute.
From-SVN: r49947
Diffstat (limited to 'gcc/c-objc-common.c')
-rw-r--r-- | gcc/c-objc-common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c index 6554cf5..b2f9969 100644 --- a/gcc/c-objc-common.c +++ b/gcc/c-objc-common.c @@ -59,6 +59,9 @@ int c_disregard_inline_limits (fn) tree fn; { + if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) != NULL) + return 1; + return DECL_DECLARED_INLINE_P (fn) && DECL_EXTERNAL (fn); } @@ -142,6 +145,10 @@ c_cannot_inline_tree_fn (fnp) tree fn = *fnp; tree t; + if (optimize == 0 + && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL) + return 1; + if (! function_attribute_inlinable_p (fn)) { DECL_UNINLINABLE (fn) = 1; |