llvm-6502/include/llvm/CodeGen
Chandler Carruth db35087d21 Implement a block placement pass based on the branch probability and
block frequency analyses. This differs substantially from the existing
block-placement pass in LLVM:

1) It operates on the Machine-IR in the CodeGen layer. This exposes much
   more (and more precise) information and opportunities. Also, the
   results are more stable due to fewer transforms ocurring after the
   pass runs.
2) It uses the generalized probability and frequency analyses. These can
   model static heuristics, code annotation derived heuristics as well
   as eventual profile loading. By basing the optimization on the
   analysis interface it can work from any (or a combination) of these
   inputs.
3) It uses a more aggressive algorithm, both building chains from tho
   bottom up to maximize benefit, and using an SCC-based walk to layout
   chains of blocks in a profitable ordering without O(N^2) iterations
   which the old pass involves.

The pass is currently gated behind a flag, and not enabled by default
because it still needs to grow some important features. Most notably, it
needs to support loop aligning and careful layout of loop structures
much as done by hand currently in CodePlacementOpt. Once it supports
these, and has sufficient testing and quality tuning, it should replace
both of these passes.

Thanks to Nick Lewycky and Richard Smith for help authoring & debugging
this, and to Jakob, Andy, Eric, Jim, and probably a few others I'm
forgetting for reviewing and answering all my questions. Writing
a backend pass is *sooo* much better now than it used to be. =D

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142641 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-21 06:46:38 +00:00
..
PBQP Remove unused STL header includes. 2011-04-23 19:53:52 +00:00
Analysis.h land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
AsmPrinter.h Fix a FIXME by making GlobalVariable::getInitializer() return a 2011-06-19 18:37:11 +00:00
BinaryObject.h
CalcSpillWeights.h Move CalculateRegClass to MRI::recomputeRegClass. 2011-08-09 16:46:27 +00:00
CallingConvLower.h Provide an ARMCCState subclass of CCState so that ARM clients will always set 2011-06-10 20:59:24 +00:00
EdgeBundles.h Build the Hopfield network incrementally when splitting global live ranges. 2011-04-09 02:59:09 +00:00
FastISel.h FastISel: avoid function calls between the materialization of the constant and its use. 2011-08-18 22:06:10 +00:00
FunctionLoweringInfo.h Directly point debug info to the stack slot of the arugment, instead of trying to keep track of vreg in which it the arugment is copied. The LiveDebugVariable can keep track of variable's ranges. 2011-09-08 22:59:09 +00:00
GCMetadata.h
GCMetadataPrinter.h
GCs.h
GCStrategy.h
IntrinsicLowering.h Recognize inline asm 'rev /bin/bash, ' as a bswap intrinsic call. 2011-01-08 01:24:27 +00:00
ISDOpcodes.h Thread the chain through the eh.sjlj.setjmp intrinsic, like it's documented to 2011-10-07 21:25:38 +00:00
JITCodeEmitter.h Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
LatencyPriorityQueue.h
LexicalScopes.h Constify. 2011-08-12 18:18:02 +00:00
LinkAllAsmWriterComponents.h
LinkAllCodegenComponents.h Delete the list-tdrr scheduler. Top-down schedulers are going away 2011-10-20 21:44:34 +00:00
LiveInterval.h Use getPrevSlot() instead of getPrevIndex(). 2011-09-15 15:31:49 +00:00
LiveIntervalAnalysis.h Dead code elimination may separate the live interval into multiple connected components. 2011-03-17 20:37:07 +00:00
LiveStackAnalysis.h Move getCommonSubClass() into TRI. 2011-09-30 22:18:51 +00:00
LiveVariables.h Silence a bunch (but not all) "variable written but not read" warnings 2011-08-12 14:54:45 +00:00
MachineBasicBlock.h Add a bool value to set the IsLandingPad flag to. 2011-10-07 23:06:01 +00:00
MachineBlockFrequencyInfo.h Add more constantness in BlockFrequencyInfo. 2011-08-03 21:30:57 +00:00
MachineBranchProbabilityInfo.h - Make BranchProbability constructor public. 2011-07-10 02:12:39 +00:00
MachineCodeEmitter.h Fix a ton of comment typos found by codespell. Patch by 2011-04-15 05:18:47 +00:00
MachineCodeInfo.h
MachineConstantPool.h Rename AddSelectionDAGCSEId() to addSelectionDAGCSEId(). 2011-09-27 20:59:33 +00:00
MachineDominators.h
MachineFrameInfo.h Create and use an llvm.eh.sjlj.functioncontext intrinsic. 2011-09-28 03:36:43 +00:00
MachineFunction.h - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and 2011-06-28 19:10:37 +00:00
MachineFunctionAnalysis.h
MachineFunctionPass.h
MachineInstr.h Add MachineInstr::getRegClassConstraint(). 2011-10-12 23:37:36 +00:00
MachineInstrBuilder.h - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and 2011-06-28 19:10:37 +00:00
MachineJumpTableInfo.h
MachineLoopInfo.h
MachineLoopRanges.h
MachineMemOperand.h
MachineModuleInfo.h Add accessor method to check if the landing pad symbol has call site information. 2011-10-05 23:26:10 +00:00
MachineModuleInfoImpls.h
MachineOperand.h Allow <undef> flags on def operands as well as uses. 2011-10-04 21:49:33 +00:00
MachinePassRegistry.h
MachineRegisterInfo.h Admonish that MI is not IR and virtual registers have constraints. 2011-10-17 17:33:39 +00:00
MachineRelocation.h
MachineSSAUpdater.h
MachORelocation.h
ObjectCodeEmitter.h
Passes.h Implement a block placement pass based on the branch probability and 2011-10-21 06:46:38 +00:00
ProcessImplicitDefs.h Place context in member variables instead of passing around pointers. 2011-03-14 20:57:14 +00:00
PseudoSourceValue.h Typos. 2011-06-01 23:32:40 +00:00
RegAllocPBQP.h Add a hook for PBQP clients to run a custom pre-alloc pass to run prior to PBQP allocation. Patch by Arnaud Allard de Grandmaison. 2011-06-17 07:09:01 +00:00
RegAllocRegistry.h
RegisterScavenging.h Teach the register scavenger to take subregs into account when finding a free register. 2011-03-05 00:20:19 +00:00
RuntimeLibcalls.h Add an intrinsic and codegen support for fused multiply-accumulate. The intent 2011-07-08 21:39:21 +00:00
ScheduleDAG.h - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and 2011-06-28 19:10:37 +00:00
ScheduleHazardRecognizer.h Convert -enable-sched-cycles and -enable-sched-hazard to -disable 2011-01-21 05:51:33 +00:00
SchedulerRegistry.h Delete the list-tdrr scheduler. Top-down schedulers are going away 2011-10-20 21:44:34 +00:00
ScoreboardHazardRecognizer.h - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and 2011-06-28 19:10:37 +00:00
SelectionDAG.h Cleanup PromoteIntOp_EXTRACT_VECTOR_ELT and PromoteIntRes_SETCC. 2011-09-27 11:16:47 +00:00
SelectionDAGISel.h Recommit the fix for rdar://9289512 with a couple tweaks to 2011-04-22 21:59:37 +00:00
SelectionDAGNodes.h Relax the MemOperands on atomics a bit. Fixes -verify-machineinstrs failures for atomic laod/store on ARM. 2011-09-07 02:23:42 +00:00
SlotIndexes.h Fix typo. 2011-09-29 21:07:46 +00:00
TargetLoweringObjectFileImpl.h Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc. 2011-07-20 19:50:42 +00:00
ValueTypes.h Fix indenting. 2011-09-13 23:45:39 +00:00
ValueTypes.td Fix formatting. 2011-06-16 16:52:24 +00:00