15#ifndef LLVM_CODEGEN_REGALLOCSCORE_H_
16#define LLVM_CODEGEN_REGALLOCSCORE_H_
23class MachineBasicBlock;
24class MachineBlockFrequencyInfo;
30 double CopyCounts = 0.0;
31 double LoadCounts = 0.0;
32 double StoreCounts = 0.0;
33 double CheapRematCounts = 0.0;
34 double LoadStoreCounts = 0.0;
35 double ExpensiveRematCounts = 0.0;
48 void onCopy(
double Freq) { CopyCounts += Freq; }
49 void onLoad(
double Freq) { LoadCounts += Freq; }
50 void onStore(
double Freq) { StoreCounts += Freq; }
65 const MachineBlockFrequencyInfo &MBFI);
69 const MachineFunction &MF,
#define LLVM_ABI_FOR_TEST
double copyCounts() const
void onLoadStore(double Freq)
RegAllocScore & operator+=(const RegAllocScore &Other)
void onCheapRemat(double Freq)
bool operator!=(const RegAllocScore &Other) const
double cheapRematCounts() const
void onStore(double Freq)
double storeCounts() const
LLVM_ABI_FOR_TEST double getScore() const
void onExpensiveRemat(double Freq)
double expensiveRematCounts() const
double loadStoreCounts() const
RegAllocScore(const RegAllocScore &)=default
double loadCounts() const
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
RegAllocScore calculateRegAllocScore(const MachineFunction &MF, const MachineBlockFrequencyInfo &MBFI)
Calculate a score.