Skip to content

Commit

Permalink
[RegScavenger] Simplify forward(MachineBasicBlock::iterator). NFC.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfoad committed May 15, 2023
1 parent 579812c commit 683c693
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/include/llvm/CodeGen/RegisterScavenging.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ class RegScavenger {
/// Move the internal MBB iterator and update register states until
/// it has processed the specific iterator.
void forward(MachineBasicBlock::iterator I) {
if (!Tracking && MBB->begin() != I) forward();
while (MBBI != I) forward();
while (!Tracking || MBBI != I)
forward();
}

/// Update internal register state and move MBB iterator backwards.
Expand Down

0 comments on commit 683c693

Please sign in to comment.