diff options
author | Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> | 2013-11-11 19:04:45 +0000 |
---|---|---|
committer | Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> | 2013-11-11 19:04:45 +0000 |
commit | ea3ac1612c8e14076af65cbdd00efa79f93a188d (patch) | |
tree | 3b4bc28e33c14fd1fb1ef5eb8e7089c33a336e6f /llvm | |
parent | 26386be1837ee7328827d6363071ce91d28d9010 (diff) | |
download | bcm5719-llvm-ea3ac1612c8e14076af65cbdd00efa79f93a188d.tar.gz bcm5719-llvm-ea3ac1612c8e14076af65cbdd00efa79f93a188d.zip |
CalcSpillWeights: give a better describing name to calculateSpillWeights
Besides, this relates it more obviously to the VirtRegAuxInfo::calculateSpillWeightAndHint.
No functionnal change.
llvm-svn: 194404
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/CodeGen/CalcSpillWeights.h | 10 | ||||
-rw-r--r-- | llvm/lib/CodeGen/CalcSpillWeights.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/LiveRangeEdit.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/RegAllocBasic.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/RegAllocGreedy.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/RegAllocPBQP.cpp | 3 |
6 files changed, 14 insertions, 15 deletions
diff --git a/llvm/include/llvm/CodeGen/CalcSpillWeights.h b/llvm/include/llvm/CodeGen/CalcSpillWeights.h index 00d9c6a5e62..60be6115272 100644 --- a/llvm/include/llvm/CodeGen/CalcSpillWeights.h +++ b/llvm/include/llvm/CodeGen/CalcSpillWeights.h @@ -55,16 +55,14 @@ namespace llvm { : MF(mf), LIS(lis), Loops(loops), MBFI(mbfi) {} /// \brief (re)compute li's spill weight and allocation hint. - void CalculateWeightAndHint(LiveInterval &li); + void calculateSpillWeightAndHint(LiveInterval &li); }; /// \brief Compute spill weights and allocation hints for all virtual register /// live intervals. - void calculateSpillWeights(LiveIntervals &LIS, - MachineFunction &MF, - const MachineLoopInfo &MLI, - const MachineBlockFrequencyInfo &MBFI); - + void calculateSpillWeightsAndHints(LiveIntervals &LIS, MachineFunction &MF, + const MachineLoopInfo &MLI, + const MachineBlockFrequencyInfo &MBFI); } #endif // LLVM_CODEGEN_CALCSPILLWEIGHTS_H diff --git a/llvm/lib/CodeGen/CalcSpillWeights.cpp b/llvm/lib/CodeGen/CalcSpillWeights.cpp index d02ee03adbd..087d737ad37 100644 --- a/llvm/lib/CodeGen/CalcSpillWeights.cpp +++ b/llvm/lib/CodeGen/CalcSpillWeights.cpp @@ -22,7 +22,7 @@ #include "llvm/Target/TargetRegisterInfo.h" using namespace llvm; -void llvm::calculateSpillWeights(LiveIntervals &LIS, +void llvm::calculateSpillWeightsAndHints(LiveIntervals &LIS, MachineFunction &MF, const MachineLoopInfo &MLI, const MachineBlockFrequencyInfo &MBFI) { @@ -35,7 +35,7 @@ void llvm::calculateSpillWeights(LiveIntervals &LIS, unsigned Reg = TargetRegisterInfo::index2VirtReg(i); if (MRI.reg_nodbg_empty(Reg)) continue; - VRAI.CalculateWeightAndHint(LIS.getInterval(Reg)); + VRAI.calculateSpillWeightAndHint(LIS.getInterval(Reg)); } } @@ -92,7 +92,7 @@ static bool isRematerializable(const LiveInterval &LI, } void -VirtRegAuxInfo::CalculateWeightAndHint(LiveInterval &li) { +VirtRegAuxInfo::calculateSpillWeightAndHint(LiveInterval &li) { MachineRegisterInfo &mri = MF.getRegInfo(); const TargetRegisterInfo &tri = *MF.getTarget().getRegisterInfo(); MachineBasicBlock *mbb = 0; diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp index 09b0cede91d..cb70c43bf55 100644 --- a/llvm/lib/CodeGen/LiveRangeEdit.cpp +++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp @@ -414,6 +414,6 @@ LiveRangeEdit::calculateRegClassAndHint(MachineFunction &MF, if (MRI.recomputeRegClass(LI.reg, MF.getTarget())) DEBUG(dbgs() << "Inflated " << PrintReg(LI.reg) << " to " << MRI.getRegClass(LI.reg)->getName() << '\n'); - VRAI.CalculateWeightAndHint(LI); + VRAI.calculateSpillWeightAndHint(LI); } } diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp index 6926a8915a0..6768e45c6cd 100644 --- a/llvm/lib/CodeGen/RegAllocBasic.cpp +++ b/llvm/lib/CodeGen/RegAllocBasic.cpp @@ -278,9 +278,9 @@ bool RABasic::runOnMachineFunction(MachineFunction &mf) { getAnalysis<LiveIntervals>(), getAnalysis<LiveRegMatrix>()); - calculateSpillWeights(*LIS, *MF, - getAnalysis<MachineLoopInfo>(), - getAnalysis<MachineBlockFrequencyInfo>()); + calculateSpillWeightsAndHints(*LIS, *MF, + getAnalysis<MachineLoopInfo>(), + getAnalysis<MachineBlockFrequencyInfo>()); SpillerInstance.reset(createInlineSpiller(*this, *MF, *VRM)); diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp index 5db9502d101..95b30a4823b 100644 --- a/llvm/lib/CodeGen/RegAllocGreedy.cpp +++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp @@ -1838,7 +1838,7 @@ bool RAGreedy::runOnMachineFunction(MachineFunction &mf) { SpillPlacer = &getAnalysis<SpillPlacement>(); DebugVars = &getAnalysis<LiveDebugVariables>(); - calculateSpillWeights(*LIS, mf, *Loops, *MBFI); + calculateSpillWeightsAndHints(*LIS, mf, *Loops, *MBFI); DEBUG(LIS->dump()); diff --git a/llvm/lib/CodeGen/RegAllocPBQP.cpp b/llvm/lib/CodeGen/RegAllocPBQP.cpp index 77d78709cf0..88c8201fd4b 100644 --- a/llvm/lib/CodeGen/RegAllocPBQP.cpp +++ b/llvm/lib/CodeGen/RegAllocPBQP.cpp @@ -549,7 +549,8 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) { lss = &getAnalysis<LiveStacks>(); mbfi = &getAnalysis<MachineBlockFrequencyInfo>(); - calculateSpillWeights(*lis, MF, getAnalysis<MachineLoopInfo>(), *mbfi); + calculateSpillWeightsAndHints(*lis, MF, getAnalysis<MachineLoopInfo>(), + *mbfi); vrm = &getAnalysis<VirtRegMap>(); spiller.reset(createInlineSpiller(*this, MF, *vrm)); |