[llvm] 683c693 - [RegScavenger] Simplify forward(MachineBasicBlock::iterator). NFC.
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon May 15 03:47:31 PDT 2023
Author: Jay Foad
Date: 2023-05-15T11:39:17+01:00
New Revision: 683c6936a17441634b63ede778b075f40112a73c
URL: https://github.com/llvm/llvm-project/commit/683c6936a17441634b63ede778b075f40112a73c
DIFF: https://github.com/llvm/llvm-project/commit/683c6936a17441634b63ede778b075f40112a73c.diff
LOG: [RegScavenger] Simplify forward(MachineBasicBlock::iterator). NFC.
Added:
Modified:
llvm/include/llvm/CodeGen/RegisterScavenging.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/RegisterScavenging.h b/llvm/include/llvm/CodeGen/RegisterScavenging.h
index e6995672931cf..94a127ebee184 100644
--- a/llvm/include/llvm/CodeGen/RegisterScavenging.h
+++ b/llvm/include/llvm/CodeGen/RegisterScavenging.h
@@ -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.
More information about the llvm-commits
mailing list