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 <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.
#define DEBUG_TYPE "regalloc" |
Definition at line 14 of file RegAllocLinearScan.cpp.
typedef std::priority_queue<LiveInterval*, std::vector<LiveInterval*>, greater_ptr<LiveInterval> > IntervalHeap |
Definition at line 80 of file RegAllocLinearScan.cpp.
typedef std::pair<LiveInterval*, LiveInterval::iterator> IntervalPtr |
Definition at line 47 of file RegAllocLinearScan.cpp.
typedef std::vector<IntervalPtr> IntervalPtrs |
Definition at line 48 of file RegAllocLinearScan.cpp.
static RA::IntervalPtrs::iterator FindIntervalInVector | ( | RA::IntervalPtrs & | IP, | |
LiveInterval * | LI | |||
) | [static] |
static void RevertVectorIteratorsTo | ( | RA::IntervalPtrs & | V, | |
unsigned | Point | |||
) | [static] |
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 384 of file RegAllocLinearScan.cpp.
References llvm::MRegisterInfo::getAliasSet(), and MRI.
active_ - Intervals that are currently being processed, and which have a live range active for the current point.
Definition at line 72 of file RegAllocLinearScan.cpp.
Statistic<double> efficiency("regalloc","Ratio of intervals processed over total intervals") [static] |
fixed_ - Intervals that correspond to machine registers.
Definition at line 68 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 64 of file RegAllocLinearScan.cpp.
inactive_ - Intervals that are currently being processed, but which have a hold at the current point.
Definition at line 76 of file RegAllocLinearScan.cpp.
Definition at line 59 of file RegAllocLinearScan.cpp.
Definition at line 56 of file RegAllocLinearScan.cpp.
const MRegisterInfo* mri_ |
Definition at line 58 of file RegAllocLinearScan.cpp.
Statistic NumBacktracks("regalloc","Number of times we had to backtrack") [static] |
unsigned numIntervals = 0 [static] |
Definition at line 44 of file RegAllocLinearScan.cpp.
unsigned numIterations = 0 [static] |
Definition at line 43 of file RegAllocLinearScan.cpp.
std::map<unsigned, const TargetRegisterClass*> OneClassForEachPhysReg |
Definition at line 54 of file RegAllocLinearScan.cpp.
bool* PhysRegsUsed |
Definition at line 60 of file RegAllocLinearScan.cpp.
std::auto_ptr<PhysRegTracker> prt_ |
Definition at line 82 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 53 of file RegAllocLinearScan.cpp.
Definition at line 84 of file RegAllocLinearScan.cpp.
const TargetMachine* tm_ |
Definition at line 57 of file RegAllocLinearScan.cpp.
Definition at line 81 of file RegAllocLinearScan.cpp.
std::auto_ptr<VirtRegMap> vrm_ |
Definition at line 83 of file RegAllocLinearScan.cpp.