From cff5fabfc995b42f51a3d676f5e1b7d851fa2215 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Thu, 19 Nov 2015 21:18:52 +0000 Subject: [PATCH] Expand subregisters in MachineFrameInfo::getPristineRegs http://reviews.llvm.org/D14719 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253600 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineFunction.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 7e4c9b779f2..7e6af1c9c41 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -620,10 +620,9 @@ BitVector MachineFrameInfo::getPristineRegs(const MachineFunction &MF) const { BV.set(*CSR); // Saved CSRs are not pristine. - const std::vector &CSI = getCalleeSavedInfo(); - for (std::vector::const_iterator I = CSI.begin(), - E = CSI.end(); I != E; ++I) - BV.reset(I->getReg()); + for (auto &I : getCalleeSavedInfo()) + for (MCSubRegIterator S(I.getReg(), TRI, true); S.isValid(); ++S) + BV.reset(*S); return BV; } -- 2.34.1