LLVM API Documentation

Defines | Functions | Variables
RegAllocGreedy.cpp File Reference
#include "llvm/CodeGen/Passes.h"
#include "AllocationOrder.h"
#include "InterferenceCache.h"
#include "LiveDebugVariables.h"
#include "RegAllocBase.h"
#include "SpillPlacement.h"
#include "Spiller.h"
#include "SplitKit.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/CalcSpillWeights.h"
#include "llvm/CodeGen/EdgeBundles.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
#include "llvm/CodeGen/LiveRangeEdit.h"
#include "llvm/CodeGen/LiveRegMatrix.h"
#include "llvm/CodeGen/LiveStackAnalysis.h"
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RegAllocRegistry.h"
#include "llvm/CodeGen/RegisterClassInfo.h"
#include "llvm/CodeGen/VirtRegMap.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/PassAnalysisSupport.h"
#include "llvm/Support/BranchProbability.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include <queue>
Include dependency graph for RegAllocGreedy.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "regalloc"

Functions

 STATISTIC (NumGlobalSplits,"Number of split global live ranges")
 STATISTIC (NumLocalSplits,"Number of split local live ranges")
 STATISTIC (NumEvicted,"Number of interferences evicted")
static unsigned getNumAllocatableRegsForConstraints (const MachineInstr *MI, unsigned Reg, const TargetRegisterClass *SuperRC, const TargetInstrInfo *TII, const TargetRegisterInfo *TRI, const RegisterClassInfo &RCI)

Variables

static cl::opt
< SplitEditor::ComplementSpillMode
SplitSpillMode ("split-spill-mode", cl::Hidden, cl::desc("Spill mode for splitting live ranges"), cl::values(clEnumValN(SplitEditor::SM_Partition,"default","Default"), clEnumValN(SplitEditor::SM_Size,"size","Optimize for size"), clEnumValN(SplitEditor::SM_Speed,"speed","Optimize for speed"), clEnumValEnd), cl::init(SplitEditor::SM_Partition))
static cl::opt< unsignedLastChanceRecoloringMaxDepth ("lcr-max-depth", cl::Hidden, cl::desc("Last chance recoloring max depth"), cl::init(5))
static cl::opt< unsignedLastChanceRecoloringMaxInterference ("lcr-max-interf", cl::Hidden, cl::desc("Last chance recoloring maximum number of considered"" interference at a time"), cl::init(8))
static cl::opt< boolExhaustiveSearch ("exhaustive-register-search", cl::NotHidden, cl::desc("Exhaustive Search for registers bypassing the depth ""and interference cutoffs of last chance recoloring"))
static cl::opt< boolEnableLocalReassignment ("enable-local-reassign", cl::Hidden, cl::desc("Local reassignment can yield better allocation decisions, but ""may be compile time intensive"), cl::init(false))
static cl::opt< unsignedCSRFirstTimeCost ("regalloc-csr-first-time-cost", cl::desc("Cost for first time use of callee-saved register."), cl::init(0), cl::Hidden)
static RegisterRegAlloc greedyRegAlloc ("greedy","greedy register allocator", createGreedyRegisterAllocator)
const float Hysteresis = (2007 / 2048.0f)

Define Documentation

#define DEBUG_TYPE   "regalloc"

Definition at line 52 of file RegAllocGreedy.cpp.


Function Documentation

Get the number of allocatable registers that match the constraints of Reg on MI and that are also in SuperRC.

Definition at line 1493 of file RegAllocGreedy.cpp.

References llvm::RegisterClassInfo::getNumAllocatableRegs(), and llvm::MachineInstr::getRegClassConstraintEffectForVReg().

STATISTIC ( NumGlobalSplits  ,
"Number of split global live ranges"   
)
STATISTIC ( NumLocalSplits  ,
"Number of split local live ranges"   
)
STATISTIC ( NumEvicted  ,
"Number of interferences evicted"   
)

Variable Documentation

cl::opt<unsigned> CSRFirstTimeCost("regalloc-csr-first-time-cost", cl::desc("Cost for first time use of callee-saved register."), cl::init(0), cl::Hidden) [static]
cl::opt<bool> EnableLocalReassignment("enable-local-reassign", cl::Hidden, cl::desc("Local reassignment can yield better allocation decisions, but ""may be compile time intensive"), cl::init(false)) [static]
cl::opt<bool> ExhaustiveSearch("exhaustive-register-search", cl::NotHidden, cl::desc("Exhaustive Search for registers bypassing the depth ""and interference cutoffs of last chance recoloring")) [static]
RegisterRegAlloc greedyRegAlloc("greedy","greedy register allocator", createGreedyRegisterAllocator) [static]
const float Hysteresis = (2007 / 2048.0f)

Definition at line 399 of file RegAllocGreedy.cpp.

cl::opt<unsigned> LastChanceRecoloringMaxDepth("lcr-max-depth", cl::Hidden, cl::desc("Last chance recoloring max depth"), cl::init(5)) [static]
cl::opt<unsigned> LastChanceRecoloringMaxInterference("lcr-max-interf", cl::Hidden, cl::desc("Last chance recoloring maximum number of considered"" interference at a time"), cl::init(8)) [static]
cl::opt<SplitEditor::ComplementSpillMode> SplitSpillMode("split-spill-mode", cl::Hidden, cl::desc("Spill mode for splitting live ranges"), cl::values(clEnumValN(SplitEditor::SM_Partition,"default","Default"),clEnumValN(SplitEditor::SM_Size,"size","Optimize for size"),clEnumValN(SplitEditor::SM_Speed,"speed","Optimize for speed"),clEnumValEnd), cl::init(SplitEditor::SM_Partition)) [static]