[llvm-commits] [llvm] r171624 - /llvm/trunk/lib/IR/Attributes.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Jan 5 04:08:00 PST 2013
Author: d0k
Date: Sat Jan 5 06:08:00 2013
New Revision: 171624
URL: http://llvm.org/viewvc/llvm-project?rev=171624&view=rev
Log:
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.
Modified:
llvm/trunk/lib/IR/Attributes.cpp
Modified: llvm/trunk/lib/IR/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=171624&r1=171623&r2=171624&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Attributes.cpp (original)
+++ llvm/trunk/lib/IR/Attributes.cpp Sat Jan 5 06:08:00 2013
@@ -45,7 +45,8 @@
// 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);
More information about the llvm-commits
mailing list