diff options
author | Pete Cooper <peter_cooper@apple.com> | 2015-05-06 23:19:56 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2015-05-06 23:19:56 +0000 |
commit | 2777d8874541335b96c7f23ec2e33e6491e6d170 (patch) | |
tree | d444a60fb5f17be61d66d034543b0eb909b591df /llvm/lib/IR/Attributes.cpp | |
parent | a842c3fc57d153cf2c002cecad9ca5f912d03a6d (diff) | |
download | bcm5719-llvm-2777d8874541335b96c7f23ec2e33e6491e6d170.tar.gz bcm5719-llvm-2777d8874541335b96c7f23ec2e33e6491e6d170.zip |
Change typeIncompatible to return an AttrBuilder instead of new-ing an AttributeSet.
This makes use of the new API which can remove attributes from a set given a builder.
This is much faster than creating a temporary set and reduces llc time by about 0.3% which was all spent creating temporary attributes sets on the context.
llvm-svn: 236668
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r-- | llvm/lib/IR/Attributes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index 6452608af6b..55d3122bbd8 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -1370,7 +1370,7 @@ AttrBuilder &AttrBuilder::addRawValue(uint64_t Val) { //===----------------------------------------------------------------------===// /// \brief Which attributes cannot be applied to a type. -AttributeSet AttributeFuncs::typeIncompatible(Type *Ty, uint64_t Index) { +AttrBuilder AttributeFuncs::typeIncompatible(const Type *Ty) { AttrBuilder Incompatible; if (!Ty->isIntegerTy()) @@ -1392,5 +1392,5 @@ AttributeSet AttributeFuncs::typeIncompatible(Type *Ty, uint64_t Index) { .addAttribute(Attribute::StructRet) .addAttribute(Attribute::InAlloca); - return AttributeSet::get(Ty->getContext(), Index, Incompatible); + return Incompatible; } |