summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-01-05 12:08:00 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-01-05 12:08:00 +0000
commitd60321ba195273003bfd7a948c36ddd77605ead4 (patch)
treec8a03a3b2c736df1463f99003ba7f47812f6d3e2 /llvm/lib/IR/Attributes.cpp
parent441c2ac98afdd9e505a85103452d1a238db840c3 (diff)
downloadbcm5719-llvm-d60321ba195273003bfd7a948c36ddd77605ead4.tar.gz
bcm5719-llvm-d60321ba195273003bfd7a948c36ddd77605ead4.zip
Attribute: Make hashes match when looking up AttributeImpls.
This isn't optimal either but fixes a massive compile time regression from the attribute uniquing work. llvm-svn: 171624
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index c0704dc97bc..117b510288b 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -45,7 +45,8 @@ Attribute Attribute::get(LLVMContext &Context, AttrBuilder &B) {
// Otherwise, build a key to look up the existing attributes.
LLVMContextImpl *pImpl = Context.pImpl;
FoldingSetNodeID ID;
- ID.AddInteger(B.getBitMask());
+ // FIXME: Don't look up ConstantInts here.
+ ID.AddPointer(ConstantInt::get(Type::getInt64Ty(Context), B.getBitMask()));
void *InsertPoint;
AttributeImpl *PA = pImpl->AttrsSet.FindNodeOrInsertPos(ID, InsertPoint);
OpenPOWER on IntegriCloud