|
LLVM
4.0.0
|
#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/Passes.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/TargetInstrInfo.h"#include "llvm/Target/TargetSubtargetInfo.h"#include <queue>Go to the source code of this file.
Macros | |
| #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") | |
| INITIALIZE_PASS_BEGIN (RAGreedy,"greedy","Greedy Register Allocator", false, false) INITIALIZE_PASS_END(RAGreedy | |
| static unsigned | getNumAllocatableRegsForConstraints (const MachineInstr *MI, unsigned Reg, const TargetRegisterClass *SuperRC, const TargetInstrInfo *TII, const TargetRegisterInfo *TRI, const RegisterClassInfo &RCI) |
Get the number of allocatable registers that match the constraints of Reg on MI and that are also in SuperRC. More... | |
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")), cl::init(SplitEditor::SM_Speed)) |
| static 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< bool > | ExhaustiveSearch ("exhaustive-register-search", cl::NotHidden, cl::desc("Exhaustive Search for registers bypassing the depth ""and interference cutoffs of last chance recoloring")) |
| 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 > | EnableDeferredSpilling ("enable-deferred-spilling", cl::Hidden, cl::desc("Instead of spilling a variable right away, defer the actual ""code insertion to the end of the allocation. That way the ""allocator might still find a suitable coloring for this ""variable because of other evicted variables."), cl::init(false)) |
| static 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 RegisterRegAlloc | greedyRegAlloc ("greedy","greedy register allocator", createGreedyRegisterAllocator) |
| greedy | |
| Greedy Register | Allocator |
| Greedy Register | false |
| const float | Hysteresis = (2007 / 2048.0f) |
| #define DEBUG_TYPE "regalloc" |
Definition at line 53 of file RegAllocGreedy.cpp.
|
static |
Get the number of allocatable registers that match the constraints of Reg on MI and that are also in SuperRC.
Definition at line 1570 of file RegAllocGreedy.cpp.
References assert(), 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" | |||
| ) |
| Greedy Register Allocator |
Definition at line 442 of file RegAllocGreedy.cpp.
Referenced by llvm::DwarfAccelTable::AddName(), llvm::Recycler< llvm::MachineInstr >::Allocate(), llvm::LiveInterval::createSubRange(), llvm::LiveInterval::createSubRangeFrom(), llvm::ConnectedVNInfoEqClasses::Distribute(), llvm::pdb::TpiStreamBuilder::finalizeMsfLayout(), llvm::DwarfAccelTable::FinalizeTable(), llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::getAllocator(), llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::insertIntoScope(), operator new(), and printSymbolizedStackTrace().
|
static |
|
static |
|
static |
|
static |
| Greedy Register false |
Definition at line 442 of file RegAllocGreedy.cpp.
| greedy |
Definition at line 442 of file RegAllocGreedy.cpp.
|
static |
| const float Hysteresis = (2007 / 2048.0f) |
Definition at line 459 of file RegAllocGreedy.cpp.
|
static |
|
static |
|
static |
1.8.6