Skip to content

Commit 826355b

Browse files
committed
Applied suggested changes: variables format fix and unnecessary pointer comparison
1 parent 876f761 commit 826355b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/CodeGen/SlotIndexes.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void SlotIndexes::repairIndexesInRange(MachineBasicBlock *MBB,
212212
IndexList::iterator ListI = endIdx.listEntry()->getIterator();
213213
MachineBasicBlock::iterator MBBI = End;
214214
bool pastStart = false;
215-
bool oldIndexesRemoved = false;
215+
bool OldIndexesRemoved = false;
216216
while (ListI != ListB || MBBI != Begin || (includeStart && !pastStart)) {
217217
assert(ListI->getIndex() >= startIdx.getIndex() &&
218218
(includeStart || !pastStart) &&
@@ -230,7 +230,7 @@ void SlotIndexes::repairIndexesInRange(MachineBasicBlock *MBB,
230230
--MBBI;
231231
else
232232
pastStart = true;
233-
} else if (MIIndexNotFound || oldIndexesRemoved) {
233+
} else if (MIIndexNotFound || OldIndexesRemoved) {
234234
if (MBBI != Begin)
235235
--MBBI;
236236
else
@@ -240,7 +240,7 @@ void SlotIndexes::repairIndexesInRange(MachineBasicBlock *MBB,
240240
// -> The only thing left is to go through all the
241241
// remaining MBB instructions and update their indexes
242242
if (ListI == ListB)
243-
oldIndexesRemoved = true;
243+
OldIndexesRemoved = true;
244244
else
245245
--ListI;
246246
if (SlotMI) {
@@ -249,11 +249,11 @@ void SlotIndexes::repairIndexesInRange(MachineBasicBlock *MBB,
249249
}
250250
}
251251

252-
MachineInstr *instrToInsert = SlotMIRemoved ? SlotMI : MI;
252+
MachineInstr *InstrToInsert = SlotMIRemoved ? SlotMI : MI;
253253

254254
// Insert instruction back into the maps after passing it/removing the index
255-
if ((MIIndexNotFound || SlotMIRemoved) && instrToInsert->getParent() != nullptr && !instrToInsert->isDebugOrPseudoInstr())
256-
insertMachineInstrInMaps(*instrToInsert);
255+
if ((MIIndexNotFound || SlotMIRemoved) && InstrToInsert->getParent() && !InstrToInsert->isDebugOrPseudoInstr())
256+
insertMachineInstrInMaps(*InstrToInsert);
257257
}
258258
}
259259

0 commit comments

Comments
 (0)