From 0e1e0ce556810ad5f9d45485e686f0653530516c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 2 Sep 2023 23:17:18 +0200 Subject: Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the last commit before the upstream release/17.x branch was created. PR: 273753 MFC after: 1 month (cherry picked from commit 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e) --- .../llvm-project/llvm/lib/CodeGen/InterferenceCache.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'contrib/llvm-project/llvm/lib/CodeGen/InterferenceCache.cpp') diff --git a/contrib/llvm-project/llvm/lib/CodeGen/InterferenceCache.cpp b/contrib/llvm-project/llvm/lib/CodeGen/InterferenceCache.cpp index 3cab9e5734ee..ae197ee5553a 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/InterferenceCache.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/InterferenceCache.cpp @@ -93,8 +93,8 @@ void InterferenceCache::Entry::revalidate(LiveIntervalUnion *LIUArray, // Invalidate all iterators. PrevPos = SlotIndex(); unsigned i = 0; - for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units, ++i) - RegUnits[i].VirtTag = LIUArray[*Units].getTag(); + for (MCRegUnit Unit : TRI->regunits(PhysReg)) + RegUnits[i++].VirtTag = LIUArray[Unit].getTag(); } void InterferenceCache::Entry::reset(MCRegister physReg, @@ -110,20 +110,21 @@ void InterferenceCache::Entry::reset(MCRegister physReg, // Reset iterators. PrevPos = SlotIndex(); RegUnits.clear(); - for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units) { - RegUnits.push_back(LIUArray[*Units]); - RegUnits.back().Fixed = &LIS->getRegUnit(*Units); + for (MCRegUnit Unit : TRI->regunits(PhysReg)) { + RegUnits.push_back(LIUArray[Unit]); + RegUnits.back().Fixed = &LIS->getRegUnit(Unit); } } bool InterferenceCache::Entry::valid(LiveIntervalUnion *LIUArray, const TargetRegisterInfo *TRI) { unsigned i = 0, e = RegUnits.size(); - for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units, ++i) { + for (MCRegUnit Unit : TRI->regunits(PhysReg)) { if (i == e) return false; - if (LIUArray[*Units].changedSince(RegUnits[i].VirtTag)) + if (LIUArray[Unit].changedSince(RegUnits[i].VirtTag)) return false; + ++i; } return i == e; } -- cgit v1.2.3