aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2017-04-28 20:25:27 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2017-04-28 20:25:27 +0000
commitb19b57ea60da58d81c4af03a7ef2a1dd6a640267 (patch)
tree316220d5be2377b1456f2263960e67b6b11a5ed2 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent744c215e2958c13854c1d730a323132ce2dc9c57 (diff)
downloadllvm-b19b57ea60da58d81c4af03a7ef2a1dd6a640267.zip
llvm-b19b57ea60da58d81c4af03a7ef2a1dd6a640267.tar.gz
llvm-b19b57ea60da58d81c4af03a7ef2a1dd6a640267.tar.bz2
Add speculatable function attribute
This attribute tells the optimizer that the function may be speculated. Patch by Tom Stellard llvm-svn: 301680
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index eb8b432..54839b4 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -688,6 +688,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
return bitc::ATTR_KIND_RETURNS_TWICE;
case Attribute::SExt:
return bitc::ATTR_KIND_S_EXT;
+ case Attribute::Speculatable:
+ return bitc::ATTR_KIND_SPECULATABLE;
case Attribute::StackAlignment:
return bitc::ATTR_KIND_STACK_ALIGNMENT;
case Attribute::StackProtect: