[llvm] r266700 - Increase SmallVector size for ConstantUniqueMap::getHashValue() (NFC)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 18 17:17:55 PDT 2016
Author: mehdi_amini
Date: Mon Apr 18 19:17:55 2016
New Revision: 266700
URL: http://llvm.org/viewvc/llvm-project?rev=266700&view=rev
Log:
Increase SmallVector size for ConstantUniqueMap::getHashValue() (NFC)
This remove totally any malloc from this function on my
profile (from 155k before).
From: Mehdi Amini <mehdi.amini at apple.com>
Modified:
llvm/trunk/lib/IR/ConstantsContext.h
Modified: llvm/trunk/lib/IR/ConstantsContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ConstantsContext.h?rev=266700&r1=266699&r2=266700&view=diff
==============================================================================
--- llvm/trunk/lib/IR/ConstantsContext.h (original)
+++ llvm/trunk/lib/IR/ConstantsContext.h Mon Apr 18 19:17:55 2016
@@ -557,7 +557,7 @@ private:
return ConstantClassInfo::getTombstoneKey();
}
static unsigned getHashValue(const ConstantClass *CP) {
- SmallVector<Constant *, 8> Storage;
+ SmallVector<Constant *, 32> Storage;
return getHashValue(LookupKey(CP->getType(), ValType(CP, Storage)));
}
static bool isEqual(const ConstantClass *LHS, const ConstantClass *RHS) {
More information about the llvm-commits
mailing list