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 Add more missing #includes, found by modules build. 2015-05-11 22:41:07 +00:00
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 Remove 3 includes from MCInstrDesc.h and explicitly include them where needed 2015-05-15 21:58:42 +00:00
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 [StatepointLowering] Support of the gc.relocates for invoke statepoints. 2015-05-20 11:37:25 +00:00
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 Add a GCStrategy for CoreCLR 2015-05-20 01:07:23 +00:00
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 Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
LivePhysRegs.h Refactor UpdatePredRedefs and StepForward to avoid duplication. NFC 2015-05-05 20:14:22 +00:00
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 MachineCombiner Pass for selecting faster instruction 2014-08-03 21:35:39 +00:00
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 Clear the stub map in getSortedStubs. 2015-04-07 12:59:28 +00:00
MachineOperand.h CodeGen: Push the ModuleSlotTracker through MachineOperands 2015-06-26 22:06:47 +00:00
MachinePassRegistry.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
MachinePostDominators.h Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
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 Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
MachineSSAUpdater.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MachineTraceMetrics.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
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 [PBQP] Do not add an edge between nodes with totally disjoint allowed registers 2015-03-01 20:39:34 +00:00
RegAllocRegistry.h
RegisterClassInfo.h
RegisterPressure.h Remove declarations for nonexistent methods 2015-04-01 21:16:02 +00:00
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 Move remaining LLVM_ENABLE_DUMP conditionals out of the headers 2014-07-01 21:19:13 +00:00
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 Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
TargetSchedule.h TargetSchedule: factor out common code; NFC 2015-05-14 18:01:13 +00:00
ValueTypes.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ValueTypes.td Add support for v1i128 type. 2015-04-17 16:11:05 +00:00
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