aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2023-04-17 21:09:19 +0100
committerJay Foad <jay.foad@amd.com>2023-04-18 13:29:41 +0100
commit14bc3748109c73adde7350da60366149ae0d4c3a (patch)
treef128f4284758154fef5856e6304e0078c95f5a7b /llvm/lib/CodeGen/BranchFolding.cpp
parent83ae2d3618c1f959031e78573691f1ea86b7c809 (diff)
downloadllvm-14bc3748109c73adde7350da60366149ae0d4c3a.zip
llvm-14bc3748109c73adde7350da60366149ae0d4c3a.tar.gz
llvm-14bc3748109c73adde7350da60366149ae0d4c3a.tar.bz2
[MC] Use subregs/superregs instead of MCSubRegIterator/MCSuperRegIterator. NFC.
Differential Revision: https://reviews.llvm.org/D148613
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index b5ac90c..1b78f50 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -1877,8 +1877,8 @@ MachineBasicBlock::iterator findHoistingInsertPosAndDeps(MachineBasicBlock *MBB,
} else {
if (Uses.erase(Reg)) {
if (Reg.isPhysical()) {
- for (MCSubRegIterator SubRegs(Reg, TRI); SubRegs.isValid(); ++SubRegs)
- Uses.erase(*SubRegs); // Use sub-registers to be conservative
+ for (MCPhysReg SubReg : TRI->subregs(Reg))
+ Uses.erase(SubReg); // Use sub-registers to be conservative
}
}
addRegAndItsAliases(Reg, TRI, Defs);