llvm-6502/include/llvm
Chandler Carruth dd9d38d57b Introduce a SmallDenseMap container that re-uses the existing DenseMap
implementation.

This type includes an inline bucket array which is used initially. Once
it is exceeded, an array of 64 buckets is allocated on the heap. The
bucket count grows from there as needed. Some highlights of this
implementation:

- The inline buffer is very carefully aligned, and so supports types
  with alignment constraints.
- It works hard to avoid aliasing issues.
- Supports types with non-trivial constructors, destructors, copy
  constructions, etc. It works reasonably hard to minimize copies and
  unnecessary initialization. The most common initialization is to set
  keys to the empty key, and so that should be fast if at all possible.

This class has a performance / space trade-off. It tries to optimize for
relatively small maps, and so packs the inline bucket array densely into
the object. It will be marginally slower than a normal DenseMap in a few
use patterns, so it isn't appropriate everywhere.

The unit tests for DenseMap have been generalized a bit to support
running over different map implementations in addition to different
key/value types. They've then been automatically extended to cover the
new container through the magic of GoogleTest's typed tests.

All of this is still a bit rough though. I'm going to be cleaning up
some aspects of the implementation, documenting things better, and
adding tests which include non-trivial types. As soon as I'm comfortable
with the correctness, I plan to switch existing users of SmallMap over
to this class as it is already more correct w.r.t. construction and
destruction of objects iin the map.

Thanks to Benjamin Kramer for all the reviews of this and the lead-up
patches. That said, more review on this would really be appreciated. As
I've noted a few times, I'm quite surprised how hard it is to get the
semantics for a hashtable-based map container with a small buffer
optimization correct. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158638 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-17 09:05:09 +00:00
..
ADT Introduce a SmallDenseMap container that re-uses the existing DenseMap 2012-06-17 09:05:09 +00:00
Analysis Round 2 of dead private variable removal. 2012-06-06 19:47:08 +00:00
Assembly
Bitcode revert r156383: removal of TYPE_CODE_FUNCTION_OLD 2012-05-23 15:19:39 +00:00
CodeGen Guard private fields that are unused in Release builds with #ifndef NDEBUG. 2012-06-16 21:48:13 +00:00
Config Nuke a few dead remnants of the CBE. 2012-05-05 17:45:12 +00:00
DebugInfo
ExecutionEngine
MC Sched itinerary fix: Avoid static initializers. 2012-06-08 18:25:47 +00:00
Object Adding acessors to COFFObjectFile so that clients can get at the (non-generic) bits 2012-06-15 01:08:25 +00:00
Support Add support to the alignment support header for conjuring a character 2012-06-16 08:52:57 +00:00
TableGen Eliminate struct TableGenBackend. 2012-06-13 05:15:49 +00:00
Target *typo: Cyles changed to Cycles 2012-06-13 15:53:04 +00:00
Transforms add a new pass to instrument loads and stores for run-time bounds checking 2012-05-22 17:19:09 +00:00
Argument.h
Attributes.h PR12696: Attribute bits above 1<<30 are not encoded in bitcode 2012-05-28 15:45:43 +00:00
AutoUpgrade.h
BasicBlock.h
CallGraphSCCPass.h
CallingConv.h
CMakeLists.txt
Constant.h getAllOnesValue also works for vectors of integers. 2012-06-04 07:18:12 +00:00
Constants.h When linearizing a multiplication, return at once if we see a factor of zero, 2012-06-13 09:42:13 +00:00
DefaultPasses.h
DerivedTypes.h
Function.h Teach Function::hasAddressTaken that BlockAddress doesn't really take 2012-05-12 08:30:16 +00:00
GlobalAlias.h
GlobalValue.h Implement the isSafeToDiscardIfUnused predicate and use it in globalopt and 2012-06-14 22:48:13 +00:00
GlobalVariable.h
GVMaterializer.h
InitializePasses.h Sketch a LiveRegMatrix analysis pass. 2012-06-09 02:13:10 +00:00
InlineAsm.h
InstrTypes.h
Instruction.def
Instruction.h Now that Reassociate's LinearizeExprTree can look through arbitrary expression 2012-06-12 14:33:56 +00:00
Instructions.h Fix typos found by http://github.com/lyda/misspell-check 2012-06-02 10:20:22 +00:00
IntrinsicInst.h
Intrinsics.h generalize this to allow any argument. 2012-05-27 19:17:16 +00:00
Intrinsics.td Add a new intrinsic: llvm.fmuladd. This intrinsic represents a multiply-add 2012-06-05 19:07:46 +00:00
IntrinsicsARM.td
IntrinsicsCellSPU.td
IntrinsicsHexagon.td Hexagon V5 intrinsics support. 2012-05-11 19:39:13 +00:00
IntrinsicsNVVM.td Remove the PTX back-end and all of its artifacts (triple, etc.) 2012-05-24 21:38:21 +00:00
IntrinsicsPowerPC.td
IntrinsicsX86.td Fix intrinsics for XOP frczss/sd instructions. These instructions only take one source register and zero the upper bits of the destination rather than preserving them. 2012-06-13 07:18:53 +00:00
IntrinsicsXCore.td
LinkAllPasses.h add a new pass to instrument loads and stores for run-time bounds checking 2012-05-22 17:19:09 +00:00
LinkAllVMCore.h
Linker.h
LLVMContext.h
Metadata.h Move the Metadata merging methods from GVN and make them public in MDNode. 2012-06-16 20:33:37 +00:00
Module.h I noticed that named metadata doesn't provide a direct way of getting at the 2012-05-16 12:25:43 +00:00
OperandTraits.h
Operator.h
Pass.h
PassAnalysisSupport.h
PassManager.h
PassManagers.h Use ArrayRef instead of an explicit vector type. 2012-05-14 07:53:40 +00:00
PassRegistry.h
PassSupport.h
SymbolTableListTraits.h
Type.h
Use.h
User.h Grammar. 2012-05-16 22:08:58 +00:00
Value.h
ValueSymbolTable.h