1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

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@apple.com>
llvm-svn: 266700
This commit is contained in:
Mehdi Amini 2016-04-19 00:17:55 +00:00
parent 3e5d8ebde9
commit 6ac317d97f

View File

@ -557,7 +557,7 @@ private:
return ConstantClassInfo::getTombstoneKey(); return ConstantClassInfo::getTombstoneKey();
} }
static unsigned getHashValue(const ConstantClass *CP) { static unsigned getHashValue(const ConstantClass *CP) {
SmallVector<Constant *, 8> Storage; SmallVector<Constant *, 32> Storage;
return getHashValue(LookupKey(CP->getType(), ValType(CP, Storage))); return getHashValue(LookupKey(CP->getType(), ValType(CP, Storage)));
} }
static bool isEqual(const ConstantClass *LHS, const ConstantClass *RHS) { static bool isEqual(const ConstantClass *LHS, const ConstantClass *RHS) {