15
15
#include " llvm/CodeGen/MachineLoopInfo.h"
16
16
#include " llvm/CodeGen/MachineOperand.h"
17
17
#include " llvm/CodeGen/MachineRegisterInfo.h"
18
+ #include " llvm/CodeGen/StackMaps.h"
18
19
#include " llvm/CodeGen/TargetInstrInfo.h"
19
20
#include " llvm/CodeGen/TargetRegisterInfo.h"
20
21
#include " llvm/CodeGen/TargetSubtargetInfo.h"
21
22
#include " llvm/CodeGen/VirtRegMap.h"
22
23
#include " llvm/Support/Debug.h"
23
24
#include " llvm/Support/raw_ostream.h"
24
- #include " llvm/CodeGen/StackMaps.h"
25
25
#include < cassert>
26
26
#include < tuple>
27
27
@@ -35,7 +35,7 @@ void VirtRegAuxInfo::calculateSpillWeightsAndHints() {
35
35
36
36
MachineRegisterInfo &MRI = MF.getRegInfo ();
37
37
for (unsigned I = 0 , E = MRI.getNumVirtRegs (); I != E; ++I) {
38
- unsigned Reg = Register::index2VirtReg (I);
38
+ Register Reg = Register::index2VirtReg (I);
39
39
if (MRI.reg_nodbg_empty (Reg))
40
40
continue ;
41
41
calculateSpillWeightAndHint (LIS.getInterval (Reg));
@@ -64,14 +64,14 @@ static Register copyHint(const MachineInstr *MI, unsigned Reg,
64
64
if (Register::isVirtualRegister (HReg))
65
65
return Sub == HSub ? HReg : Register ();
66
66
67
- const TargetRegisterClass *rc = MRI.getRegClass (Reg);
67
+ const TargetRegisterClass *RC = MRI.getRegClass (Reg);
68
68
MCRegister CopiedPReg = HSub ? TRI.getSubReg (HReg, HSub) : HReg.asMCReg ();
69
- if (rc ->contains (CopiedPReg))
69
+ if (RC ->contains (CopiedPReg))
70
70
return CopiedPReg;
71
71
72
72
// Check if reg:sub matches so that a super register could be hinted.
73
73
if (Sub)
74
- return TRI.getMatchingSuperReg (CopiedPReg, Sub, rc );
74
+ return TRI.getMatchingSuperReg (CopiedPReg, Sub, RC );
75
75
76
76
return 0 ;
77
77
}
@@ -80,8 +80,8 @@ static Register copyHint(const MachineInstr *MI, unsigned Reg,
80
80
static bool isRematerializable (const LiveInterval &LI, const LiveIntervals &LIS,
81
81
const VirtRegMap &VRM,
82
82
const TargetInstrInfo &TII) {
83
- unsigned Reg = LI.reg ();
84
- unsigned Original = VRM.getOriginal (Reg);
83
+ Register Reg = LI.reg ();
84
+ Register Original = VRM.getOriginal (Reg);
85
85
for (LiveInterval::const_vni_iterator I = LI.vni_begin (), E = LI.vni_end ();
86
86
I != E; ++I) {
87
87
const VNInfo *VNI = *I;
@@ -183,17 +183,17 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start,
183
183
bool ShouldUpdateLI = !IsLocalSplitArtifact;
184
184
185
185
if (IsLocalSplitArtifact) {
186
- MachineBasicBlock *localMBB = LIS.getMBBFromIndex (*End);
187
- assert (localMBB == LIS.getMBBFromIndex (*Start) &&
186
+ MachineBasicBlock *LocalMBB = LIS.getMBBFromIndex (*End);
187
+ assert (LocalMBB == LIS.getMBBFromIndex (*Start) &&
188
188
" start and end are expected to be in the same basic block" );
189
189
190
190
// Local split artifact will have 2 additional copy instructions and they
191
191
// will be in the same BB.
192
192
// localLI = COPY other
193
193
// ...
194
194
// other = COPY localLI
195
- TotalWeight += LiveIntervals::getSpillWeight (true , false , &MBFI, localMBB );
196
- TotalWeight += LiveIntervals::getSpillWeight (false , true , &MBFI, localMBB );
195
+ TotalWeight += LiveIntervals::getSpillWeight (true , false , &MBFI, LocalMBB );
196
+ TotalWeight += LiveIntervals::getSpillWeight (false , true , &MBFI, LocalMBB );
197
197
198
198
NumInstr += 2 ;
199
199
}
0 commit comments