Skip to content

Commit 9f8e148

Browse files
committed
[CalcSpillWeights] Use Register. NFC
1 parent 3fe2255 commit 9f8e148

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/include/llvm/CodeGen/CalcSpillWeights.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class VirtRegMap;
7373

7474
/// Return the preferred allocation register for reg, given a COPY
7575
/// instruction.
76-
static Register copyHint(const MachineInstr *MI, unsigned Reg,
76+
static Register copyHint(const MachineInstr *MI, Register Reg,
7777
const TargetRegisterInfo &TRI,
7878
const MachineRegisterInfo &MRI);
7979

llvm/lib/CodeGen/CalcSpillWeights.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void VirtRegAuxInfo::calculateSpillWeightsAndHints() {
4444
}
4545

4646
// Return the preferred allocation register for reg, given a COPY instruction.
47-
Register VirtRegAuxInfo::copyHint(const MachineInstr *MI, unsigned Reg,
47+
Register VirtRegAuxInfo::copyHint(const MachineInstr *MI, Register Reg,
4848
const TargetRegisterInfo &TRI,
4949
const MachineRegisterInfo &MRI) {
5050
unsigned Sub, HSub;
@@ -74,7 +74,7 @@ Register VirtRegAuxInfo::copyHint(const MachineInstr *MI, unsigned Reg,
7474
if (Sub)
7575
return TRI.getMatchingSuperReg(CopiedPReg, Sub, RC);
7676

77-
return 0;
77+
return Register();
7878
}
7979

8080
// Check if all values in LI are rematerializable

0 commit comments

Comments
 (0)