10 #ifndef LLVM_CODEGEN_CALCSPILLWEIGHTS_H 11 #define LLVM_CODEGEN_CALCSPILLWEIGHTS_H 20 class MachineBlockFrequencyInfo;
21 class MachineFunction;
22 class MachineLoopInfo;
65 : MF(mf), LIS(lis), VRM(vrm), Loops(loops), MBFI(mbfi), normalize(norm) {}
108 #endif // LLVM_CODEGEN_CALCSPILLWEIGHTS_H const_iterator end(StringRef path)
Get end iterator over path.
Calculate auxiliary information for a virtual register such as its spill weight and allocation hint...
This class represents lattice values for constants.
LiveInterval - This class represents the liveness of a register, or stack slot.
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
float futureWeight(LiveInterval &li, SlotIndex start, SlotIndex end)
Compute future expected spill weight of a split artifact of li that will span between start and end s...
VirtRegAuxInfo(MachineFunction &mf, LiveIntervals &lis, VirtRegMap *vrm, const MachineLoopInfo &loops, const MachineBlockFrequencyInfo &mbfi, NormalizingFn norm=normalizeSpillWeight)
float weightCalcHelper(LiveInterval &li, SlotIndex *start=nullptr, SlotIndex *end=nullptr)
Helper function for weight calculations.
void calculateSpillWeightsAndHints(LiveIntervals &LIS, MachineFunction &MF, VirtRegMap *VRM, const MachineLoopInfo &MLI, const MachineBlockFrequencyInfo &MBFI, VirtRegAuxInfo::NormalizingFn norm=normalizeSpillWeight)
Compute spill weights and allocation hints for all virtual register live intervals.
void calculateSpillWeightAndHint(LiveInterval &li)
(re)compute li's spill weight and allocation hint.
static float normalizeSpillWeight(float UseDefFreq, unsigned Size, unsigned NumInstr)
Normalize the spill weight of a live interval.
The default distance between instructions as returned by distance().
float(*)(float, unsigned, unsigned) NormalizingFn
SlotIndex - An opaque wrapper around machine indexes.