LLVM API Documentation
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
#include "PhysRegTracker.h"
#include "VirtRegMap.h"
#include "llvm/Function.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/SSARegMap.h"
#include "llvm/Target/MRegisterInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/ADT/EquivalenceClasses.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Visibility.h"
#include <algorithm>
#include <cmath>
#include <iostream>
#include <set>
#include <queue>
#include <memory>
Include dependency graph for RegAllocLinearScan.cpp:
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "regalloc" |
Functions | |
static void | updateSpillWeights (std::vector< float > &Weights, unsigned reg, float weight, const MRegisterInfo *MRI) |
static RA::IntervalPtrs::iterator | FindIntervalInVector (RA::IntervalPtrs &IP, LiveInterval *LI) |
static void | RevertVectorIteratorsTo (RA::IntervalPtrs &V, unsigned Point) |
FunctionPass * | llvm::createLinearScanRegisterAllocator () |
Variables | |
static Statistic< double > | efficiency ("regalloc","Ratio of intervals processed over total intervals") |
static Statistic | NumBacktracks ("regalloc","Number of times we had to backtrack") |
static unsigned | numIterations = 0 |
static unsigned | numIntervals = 0 |
#define DEBUG_TYPE "regalloc" |
Definition at line 14 of file RegAllocLinearScan.cpp.
static RA::IntervalPtrs::iterator FindIntervalInVector | ( | RA::IntervalPtrs & | IP, | |
LiveInterval * | LI | |||
) | [static] |
static void RevertVectorIteratorsTo | ( | RA::IntervalPtrs & | V, | |
unsigned | Point | |||
) | [static] |
Definition at line 401 of file RegAllocLinearScan.cpp.
static void updateSpillWeights | ( | std::vector< float > & | Weights, | |
unsigned | reg, | |||
float | weight, | |||
const MRegisterInfo * | MRI | |||
) | [static] |
updateSpillWeights - updates the spill weights of the specifed physical register and its weight.
Definition at line 386 of file RegAllocLinearScan.cpp.
References llvm::MRegisterInfo::getAliasSet(), and MRI.
IntervalPtrs active_ |
active_ - Intervals that are currently being processed, and which have a live range active for the current point.
Definition at line 74 of file RegAllocLinearScan.cpp.
Statistic<double> efficiency("regalloc","Ratio of intervals processed over total intervals") [static] |
IntervalPtrs fixed_ |
fixed_ - Intervals that correspond to machine registers.
Definition at line 70 of file RegAllocLinearScan.cpp.
std::vector<LiveInterval*> handled_ |
handled_ - Intervals are added to the handled_ set in the order of their start value. This is uses for backtracking.
Definition at line 66 of file RegAllocLinearScan.cpp.
IntervalPtrs inactive_ |
inactive_ - Intervals that are currently being processed, but which have a hold at the current point.
Definition at line 78 of file RegAllocLinearScan.cpp.
Definition at line 61 of file RegAllocLinearScan.cpp.
Definition at line 58 of file RegAllocLinearScan.cpp.
const MRegisterInfo* mri_ |
Definition at line 60 of file RegAllocLinearScan.cpp.
Statistic NumBacktracks("regalloc","Number of times we had to backtrack") [static] |
unsigned numIntervals = 0 [static] |
Definition at line 46 of file RegAllocLinearScan.cpp.
unsigned numIterations = 0 [static] |
Definition at line 45 of file RegAllocLinearScan.cpp.
std::map<unsigned, const TargetRegisterClass*> OneClassForEachPhysReg |
Definition at line 56 of file RegAllocLinearScan.cpp.
bool* PhysRegsUsed |
Definition at line 62 of file RegAllocLinearScan.cpp.
std::auto_ptr<PhysRegTracker> prt_ |
Definition at line 84 of file RegAllocLinearScan.cpp.
RelatedRegClasses - This structure is built the first time a function is compiled, and keeps track of which register classes have registers that belong to multiple classes or have aliases that are in other classes.
Definition at line 55 of file RegAllocLinearScan.cpp.
Definition at line 86 of file RegAllocLinearScan.cpp.
const TargetMachine* tm_ |
Definition at line 59 of file RegAllocLinearScan.cpp.
IntervalHeap unhandled_ |
Definition at line 83 of file RegAllocLinearScan.cpp.
std::auto_ptr<VirtRegMap> vrm_ |
Definition at line 85 of file RegAllocLinearScan.cpp.