diff options
author | James Molloy <james.molloy@arm.com> | 2015-11-06 10:32:53 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2015-11-06 10:32:53 +0000 |
commit | e6f87ca812809543444d7d5961aea2509b8a3227 (patch) | |
tree | 0484ecea76aab7032b2b590638de7650912e9e14 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | a805030ae821fa03fb76d89b9bb81ee66f676105 (diff) | |
download | llvm-e6f87ca812809543444d7d5961aea2509b8a3227.zip llvm-e6f87ca812809543444d7d5961aea2509b8a3227.tar.gz llvm-e6f87ca812809543444d7d5961aea2509b8a3227.tar.bz2 |
Add a new attribute: norecurse
This attribute allows the compiler to assume that the function never recurses into itself, either directly or indirectly (transitively). This can be used among other things to demote global variables to locals.
llvm-svn: 252282
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index c73b099..941e547 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -202,6 +202,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) { return bitc::ATTR_KIND_NO_IMPLICIT_FLOAT; case Attribute::NoInline: return bitc::ATTR_KIND_NO_INLINE; + case Attribute::NoRecurse: + return bitc::ATTR_KIND_NO_RECURSE; case Attribute::NonLazyBind: return bitc::ATTR_KIND_NON_LAZY_BIND; case Attribute::NonNull: |