summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2013-08-23 11:53:55 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2013-08-23 11:53:55 +0000
commit377496bbaddcf6fdacbe3cd149a9ad1302bca99e (patch)
tree2d1deed1778c4fc8962cf3dc1e49af50c25c3971 /llvm/lib/IR/Attributes.cpp
parent03481334b56e88d0713fb97694256b303ab6e81a (diff)
downloadbcm5719-llvm-377496bbaddcf6fdacbe3cd149a9ad1302bca99e.tar.gz
bcm5719-llvm-377496bbaddcf6fdacbe3cd149a9ad1302bca99e.zip
Add function attribute 'optnone'.
This function attribute indicates that the function is not optimized by any optimization or code generator passes with the exception of interprocedural optimization passes. llvm-svn: 189101
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index f466d167e97..bcd324c4ffa 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -196,6 +196,8 @@ std::string Attribute::getAsString(bool InAttrGrp) const {
return "noreturn";
if (hasAttribute(Attribute::NoUnwind))
return "nounwind";
+ if (hasAttribute(Attribute::OptimizeNone))
+ return "optnone";
if (hasAttribute(Attribute::OptimizeForSize))
return "optsize";
if (hasAttribute(Attribute::ReadNone))
@@ -381,6 +383,7 @@ uint64_t AttributeImpl::getAttrMask(Attribute::AttrKind Val) {
case Attribute::Returned: return 1ULL << 39;
case Attribute::Cold: return 1ULL << 40;
case Attribute::Builtin: return 1ULL << 41;
+ case Attribute::OptimizeNone: return 1ULL << 42;
}
llvm_unreachable("Unsupported attribute type");
}
OpenPOWER on IntegriCloud