mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Recompute register class and hint for registers created during spilling.
The spill weight is not recomputed for an unspillable register - it stays infinite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128490 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "LiveRangeEdit.h"
|
||||
#include "VirtRegMap.h"
|
||||
#include "llvm/ADT/SetVector.h"
|
||||
#include "llvm/CodeGen/CalcSpillWeights.h"
|
||||
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/Target/TargetInstrInfo.h"
|
||||
@@ -236,3 +237,13 @@ void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl<MachineInstr*> &Dead,
|
||||
}
|
||||
}
|
||||
|
||||
void LiveRangeEdit::calculateRegClassAndHint(MachineFunction &MF,
|
||||
LiveIntervals &LIS,
|
||||
const MachineLoopInfo &Loops) {
|
||||
VirtRegAuxInfo VRAI(MF, LIS, Loops);
|
||||
for (iterator I = begin(), E = end(); I != E; ++I) {
|
||||
LiveInterval &LI = **I;
|
||||
VRAI.CalculateRegClass(LI.reg);
|
||||
VRAI.CalculateWeightAndHint(LI);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user