llvm-6502/lib/VMCore
Benjamin Kramer 611afc0620 Cache the hash value of the operands in the MDNode.
FoldingSet is implemented as a chained hash table. When there is a hash
collision during insertion, which is common as we fill the table until a
load factor of 2.0 is hit, we walk the chained elements, comparing every
operand with the new element's operands. This can be very expensive if the
MDNode has many operands.

We sacrifice a word of space in MDNode to cache the full hash value, reducing
compares on collision to a minimum. MDNode grows from 28 to 32 bytes + operands
on x86. On x86_64 the new bits fit nicely into existing padding, not growing
the struct at all.

The actual speedup depends a lot on the test case and is typically between
1% and 2% for C++ code with clang -c -O0 -g.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154497 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-11 14:06:54 +00:00
..
AsmWriter.cpp llvm::SwitchInst 2012-03-11 06:09:17 +00:00
Attributes.cpp Extend Attributes to 64 bits 2012-01-20 17:56:17 +00:00
AutoUpgrade.cpp Add auto upgrade support for x86 pcmpgt/pcmpeq intrinics removed in r149367. 2012-02-03 06:10:55 +00:00
BasicBlock.cpp Add a constified getLandingPad() method. 2012-01-31 00:26:24 +00:00
CMakeLists.txt Fix up cmake build. 2012-03-23 03:55:14 +00:00
ConstantFold.cpp Remove some dead code and tidy things up now that vectors use ConstantDataVector 2012-02-06 21:56:39 +00:00
ConstantFold.h
Constants.cpp Reserve space in these vectors to prevent having to grow the array too 2012-02-07 01:27:51 +00:00
ConstantsContext.h Switch this code to use hash_combine_range rather than incremental calls 2012-03-07 03:22:32 +00:00
Core.cpp add load/store volatility control to the C API, patch by Yiannis Tsiouris! 2012-03-22 03:54:15 +00:00
DebugLoc.cpp Compute hashes directly with hash_combine instead of taking a detour through FoldingSetNodeID. 2012-04-11 14:06:39 +00:00
Dominators.cpp Handle unreachable code in the dominates functions. This changes users when 2012-03-30 16:46:21 +00:00
Function.cpp Emit the "is an intrinsic overloaded" table as a bitfield. 2012-03-01 02:16:57 +00:00
GCOV.cpp Remove extra semi-colons. 2012-02-22 17:25:00 +00:00
Globals.cpp
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp [unwind removal] Remove all of the code for the dead 'unwind' instruction. There 2012-02-06 21:44:22 +00:00
Instructions.cpp Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012: 2012-03-08 07:06:20 +00:00
IntrinsicInst.cpp
IRBuilder.cpp reapply the patches reverted in r149470 that reenable ConstantDataArray, 2012-02-05 02:29:43 +00:00
LeakDetector.cpp
LeaksContext.h
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
LLVMContext.cpp First part of PR12251. Add documentation and verifier support for the range 2012-03-24 00:14:51 +00:00
LLVMContextImpl.cpp Efficient Constant Uniquing. 2012-02-05 20:54:10 +00:00
LLVMContextImpl.h Cache the hash value of the operands in the MDNode. 2012-04-11 14:06:54 +00:00
Makefile Build system infrastructure for multiple tblgens. 2011-10-06 01:51:51 +00:00
Metadata.cpp Cache the hash value of the operands in the MDNode. 2012-04-11 14:06:54 +00:00
Module.cpp s/ModAttrBehavior/ModFlagBehavior/g to be consistent with how module flags are named elsewhere. 2012-02-16 10:28:10 +00:00
Pass.cpp Added TargetPassConfig::disablePass/substitutePass as a general mechanism to override specific passes. 2012-02-15 03:21:47 +00:00
PassManager.cpp Take out the debug info probe stuff. It's making some changes to 2012-03-23 03:54:05 +00:00
PassRegistry.cpp Cosmetic changes, as per Nick's review. 2011-09-29 16:46:47 +00:00
PrintModulePass.cpp
SymbolTableListTraitsImpl.h
Type.cpp Cache the sized-ness of struct types, once we reach the steady state of 2012-03-07 02:33:09 +00:00
Use.cpp Add missing include of <new> 2012-03-26 14:04:17 +00:00
User.cpp Add some missing anchors. 2011-12-01 08:00:17 +00:00
Value.cpp The MDString class stored a StringRef to the string which was already in a 2012-04-10 20:12:16 +00:00
ValueSymbolTable.cpp
ValueTypes.cpp Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
Verifier.cpp Express the number of ULPs in fpaccuracy metadata as a real rather than a 2012-04-10 08:22:43 +00:00