llvm-6502/include/llvm/CodeGen
Duncan P. N. Exon Smith 1f0cde9fd7 AsmPrinter: Document why DIEValueList uses a linked-list, NFC
There are two main reasons why a linked-list makes sense for
`DIEValueList`.

 1. We want `DIE` to be on a `BumpPtrAllocator` to improve teardown
    efficiency.  Making `DIEValueList` array-based would make that much
    more complicated.
 2. The singly-linked list is fairly memory efficient.  The histogram
    [1] shows that most DIEs have relatively few values, so we often pay
    less than the 2/3-pointer static overhead of a vector.  Furthermore,
    we don't know ahead of time exactly how many values a `DIE` needs,
    so a vector-like scheme will on average over-allocate by ~50%.  As
    it happens, that's the same memory overhead as the linked list node.

[1]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-May/085910.html

The comment I added to the code is a little more succinct, but I think
it's enough to give the idea.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240868 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-27 01:19:17 +00:00
..
MIRParser MIR Serialization: Connect the machine function analysis pass to the MIR parser. 2015-06-15 20:30:22 +00:00
PBQP
Analysis.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
AsmPrinter.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
BasicTTIImpl.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CalcSpillWeights.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CallingConvLower.h
CommandFlags.h Fix English usage in command line flag help string. 2015-06-11 20:03:23 +00:00
DAGCombine.h
DFAPacketizer.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DIE.h AsmPrinter: Document why DIEValueList uses a linked-list, NFC 2015-06-27 01:19:17 +00:00
DIEValue.def Reapply "AsmPrinter: Change DIEValue to be stored by value" 2015-05-27 22:14:58 +00:00
DwarfStringPoolEntry.h AsmPrinter: Avoid creating symbols in DwarfStringPool 2015-05-24 16:58:59 +00:00
EdgeBundles.h
FastISel.h Use MCSymbols for FastISel. 2015-06-23 12:21:54 +00:00
FaultMaps.h Revert "[FaultMaps] Move FaultMapParser to Object/" 2015-06-23 20:09:03 +00:00
FunctionLoweringInfo.h
GCMetadata.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
GCMetadataPrinter.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
GCs.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
GCStrategy.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
IntrinsicLowering.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ISDOpcodes.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LatencyPriorityQueue.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LexicalScopes.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LinkAllAsmWriterComponents.h
LinkAllCodegenComponents.h
LiveInterval.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LiveIntervalAnalysis.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LiveIntervalUnion.h
LivePhysRegs.h
LiveRangeEdit.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LiveRegMatrix.h
LiveStackAnalysis.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LiveVariables.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineBasicBlock.h CodeGen: Use a single SlotTracker in MachineFunction::print() 2015-06-26 22:04:20 +00:00
MachineBlockFrequencyInfo.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineBranchProbabilityInfo.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineCombinerPattern.h
MachineConstantPool.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineDominanceFrontier.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineDominators.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineFrameInfo.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineFunction.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineFunctionAnalysis.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineFunctionInitializer.h MIR Serialization: Connect the machine function analysis pass to the MIR parser. 2015-06-15 20:30:22 +00:00
MachineFunctionPass.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineInstr.h CodeGen: Push the ModuleSlotTracker through MachineOperands 2015-06-26 22:06:47 +00:00
MachineInstrBuilder.h Use MCSymbols for FastISel. 2015-06-23 12:21:54 +00:00
MachineInstrBundle.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineJumpTableInfo.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineLoopInfo.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineMemOperand.h CodeGen: Push the ModuleSlotTracker through MachineOperands 2015-06-26 22:06:47 +00:00
MachineModuleInfo.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineModuleInfoImpls.h
MachineOperand.h CodeGen: Push the ModuleSlotTracker through MachineOperands 2015-06-26 22:06:47 +00:00
MachinePassRegistry.h
MachinePostDominators.h
MachineRegionInfo.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineRegisterInfo.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineScheduler.h
MachineSSAUpdater.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineTraceMetrics.h
MachineValueType.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachORelocation.h
MIRYamlMapping.h MIR Serialization: Serialize machine basic block operands. 2015-06-26 16:46:11 +00:00
Passes.h [InterleavedAccess] Add a pass InterleavedAccess to identify interleaved memory accesses and transform into target specific intrinsics. 2015-06-26 02:10:27 +00:00
PBQPRAConstraint.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
PseudoSourceValue.h CodeGen: Push the ModuleSlotTracker through MachineOperands 2015-06-26 22:06:47 +00:00
RegAllocPBQP.h
RegAllocRegistry.h
RegisterClassInfo.h
RegisterPressure.h
RegisterScavenging.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ResourcePriorityQueue.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
RuntimeLibcalls.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ScheduleDAG.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ScheduleDAGInstrs.h Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
ScheduleDFS.h
ScheduleHazardRecognizer.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
SchedulerRegistry.h
ScoreboardHazardRecognizer.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
SelectionDAG.h Avoid a Symbol -> Name -> Symbol conversion. 2015-06-22 17:46:53 +00:00
SelectionDAGISel.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
SelectionDAGNodes.h Convert a bunch of loops to foreach. NFC. 2015-06-26 19:18:49 +00:00
SlotIndexes.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
StackMaps.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
StackProtector.h
TargetLoweringObjectFileImpl.h
TargetSchedule.h
ValueTypes.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ValueTypes.td
VirtRegMap.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
WinEHFuncInfo.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00