diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-02-06 01:16:28 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-02-06 01:16:28 +0000 |
commit | 570a4a5d9ca31f276a67502d1e0533d59d331fea (patch) | |
tree | 306ece29a43dcc79fe17a0665e6534ce137e4582 /include/llvm/Attributes.h | |
parent | 8d535859e583183591503aa63cd4559271803920 (diff) | |
download | llvm-570a4a5d9ca31f276a67502d1e0533d59d331fea.tar.gz llvm-570a4a5d9ca31f276a67502d1e0533d59d331fea.tar.bz2 llvm-570a4a5d9ca31f276a67502d1e0533d59d331fea.tar.xz |
Reintroduce the InlineHint function attribute.
This time it's for real! I am going to hook this up in the frontends as well.
The inliner has some experimental heuristics for dealing with the inline hint.
When given a -respect-inlinehint option, functions marked with the inline
keyword are given a threshold just above the default for -O3.
We need some experiments to determine if that is the right thing to do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95466 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Attributes.h')
-rw-r--r-- | include/llvm/Attributes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index 7fa5d4ae6b..068f81fc7d 100644 --- a/include/llvm/Attributes.h +++ b/include/llvm/Attributes.h @@ -58,6 +58,8 @@ const Attributes NoRedZone = 1<<22; /// disable redzone const Attributes NoImplicitFloat = 1<<23; /// disable implicit floating point /// instructions. const Attributes Naked = 1<<24; ///< Naked function +const Attributes InlineHint = 1<<25; ///< source said inlining was + ///desirable /// @brief Attributes that only apply to function parameters. const Attributes ParameterOnly = ByVal | Nest | StructRet | NoCapture; @@ -66,7 +68,7 @@ const Attributes ParameterOnly = ByVal | Nest | StructRet | NoCapture; /// be used on return values or function parameters. const Attributes FunctionOnly = NoReturn | NoUnwind | ReadNone | ReadOnly | NoInline | AlwaysInline | OptimizeForSize | StackProtect | StackProtectReq | - NoRedZone | NoImplicitFloat | Naked; + NoRedZone | NoImplicitFloat | Naked | InlineHint; /// @brief Parameter attributes that do not apply to vararg call arguments. const Attributes VarArgsIncompatible = StructRet; |