11 #ifndef LLVM_CODEGEN_CALCSPILLWEIGHTS_H
12 #define LLVM_CODEGEN_CALCSPILLWEIGHTS_H
21 class MachineBlockFrequencyInfo;
22 class MachineLoopInfo;
62 : MF(mf), LIS(lis), Loops(loops), MBFI(mbfi), normalize(norm) {}
71 const MachineLoopInfo &MLI,
72 const MachineBlockFrequencyInfo &MBFI,
77 #endif // LLVM_CODEGEN_CALCSPILLWEIGHTS_H
Calculate auxiliary information for a virtual register such as its spill weight and allocation hint...
float(* NormalizingFn)(float, unsigned)
void calculateSpillWeightsAndHints(LiveIntervals &LIS, MachineFunction &MF, const MachineLoopInfo &MLI, const MachineBlockFrequencyInfo &MBFI, VirtRegAuxInfo::NormalizingFn norm=normalizeSpillWeight)
Compute spill weights and allocation hints for all virtual register live intervals.
static float normalizeSpillWeight(float UseDefFreq, unsigned Size)
Normalize the spill weight of a live interval.
VirtRegAuxInfo(MachineFunction &mf, LiveIntervals &lis, const MachineLoopInfo &loops, const MachineBlockFrequencyInfo &mbfi, NormalizingFn norm=normalizeSpillWeight)
void calculateSpillWeightAndHint(LiveInterval &li)
(re)compute li's spill weight and allocation hint.