Skip to content

Commit aaaaa4d

Browse files
committed
[MachineLICM] Use Register. NFC
1 parent dd9bb32 commit aaaaa4d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/CodeGen/MachineLICM.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,17 +208,17 @@ namespace {
208208
/// Keep track of information about hoisting candidates.
209209
struct CandidateInfo {
210210
MachineInstr *MI;
211-
unsigned Def;
211+
Register Def;
212212
int FI;
213213

214-
CandidateInfo(MachineInstr *mi, unsigned def, int fi)
214+
CandidateInfo(MachineInstr *mi, Register def, int fi)
215215
: MI(mi), Def(def), FI(fi) {}
216216
};
217217

218218
void HoistRegionPostRA(MachineLoop *CurLoop,
219219
MachineBasicBlock *CurPreheader);
220220

221-
void HoistPostRA(MachineInstr *MI, unsigned Def, MachineLoop *CurLoop,
221+
void HoistPostRA(MachineInstr *MI, Register Def, MachineLoop *CurLoop,
222222
MachineBasicBlock *CurPreheader);
223223

224224
void ProcessMI(MachineInstr *MI, BitVector &RUDefs, BitVector &RUClobbers,
@@ -518,7 +518,7 @@ void MachineLICMImpl::ProcessMI(MachineInstr *MI, BitVector &RUDefs,
518518
MachineLoop *CurLoop) {
519519
bool RuledOut = false;
520520
bool HasNonInvariantUse = false;
521-
unsigned Def = 0;
521+
Register Def;
522522
for (const MachineOperand &MO : MI->operands()) {
523523
if (MO.isFI()) {
524524
// Remember if the instruction stores to the frame index.
@@ -672,7 +672,7 @@ void MachineLICMImpl::HoistRegionPostRA(MachineLoop *CurLoop,
672672
StoredFIs.count(Candidate.FI))
673673
continue;
674674

675-
unsigned Def = Candidate.Def;
675+
Register Def = Candidate.Def;
676676
bool Safe = true;
677677
for (MCRegUnitIterator RUI(Def, TRI); RUI.isValid(); ++RUI) {
678678
if (RUClobbers.test(*RUI) || TermRUs.test(*RUI)) {
@@ -725,7 +725,7 @@ void MachineLICMImpl::AddToLiveIns(MCRegister Reg, MachineLoop *CurLoop) {
725725

726726
/// When an instruction is found to only use loop invariant operands that is
727727
/// safe to hoist, this instruction is called to do the dirty work.
728-
void MachineLICMImpl::HoistPostRA(MachineInstr *MI, unsigned Def,
728+
void MachineLICMImpl::HoistPostRA(MachineInstr *MI, Register Def,
729729
MachineLoop *CurLoop,
730730
MachineBasicBlock *CurPreheader) {
731731
MachineBasicBlock *Preheader = getCurPreheader(CurLoop, CurPreheader);

0 commit comments

Comments
 (0)