class VirtRegAuxInfo {
MachineFunction &mf_;
LiveIntervals &lis_;
- MachineLoopInfo &loops_;
+ const MachineLoopInfo &loops_;
DenseMap<unsigned, float> hint_;
public:
VirtRegAuxInfo(MachineFunction &mf, LiveIntervals &lis,
- MachineLoopInfo &loops) :
+ const MachineLoopInfo &loops) :
mf_(mf), lis_(lis), loops_(loops) {}
- /// CalculateRegClass - recompute the register class for li from its uses.
+ /// CalculateRegClass - recompute the register class for reg from its uses.
/// Since the register class can affect the allocation hint, this function
/// should be called before CalculateWeightAndHint if both are called.
- void CalculateRegClass(LiveInterval &li);
+ void CalculateRegClass(unsigned reg);
/// CalculateWeightAndHint - (re)compute li's spill weight and allocation
/// hint.
public:
static char ID;
- CalculateSpillWeights() : MachineFunctionPass(ID) {}
+ CalculateSpillWeights() : MachineFunctionPass(ID) {
+ initializeCalculateSpillWeightsPass(*PassRegistry::getPassRegistry());
+ }
virtual void getAnalysisUsage(AnalysisUsage &au) const;