mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
Use make_range(rbegin(), rend()) to allow foreach loops. NFC.
Instead of the pattern for (auto I = x.rbegin(), E = x.end(); I != E; ++I) we can use make_range to construct the reverse range and iterate using that instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243163 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -559,12 +559,11 @@ void ExeDepsFix::processUndefReads(MachineBasicBlock *MBB) {
|
||||
MachineInstr *UndefMI = UndefReads.back().first;
|
||||
unsigned OpIdx = UndefReads.back().second;
|
||||
|
||||
for (MachineBasicBlock::reverse_iterator I = MBB->rbegin(), E = MBB->rend();
|
||||
I != E; ++I) {
|
||||
for (MachineInstr &I : make_range(MBB->rbegin(), MBB->rend())) {
|
||||
// Update liveness, including the current instruction's defs.
|
||||
LiveRegSet.stepBackward(*I);
|
||||
LiveRegSet.stepBackward(I);
|
||||
|
||||
if (UndefMI == &*I) {
|
||||
if (UndefMI == &I) {
|
||||
if (!LiveRegSet.contains(UndefMI->getOperand(OpIdx).getReg()))
|
||||
TII->breakPartialRegDependency(UndefMI, OpIdx, TRI);
|
||||
|
||||
|
Reference in New Issue
Block a user