From 98ab4c64c429583a097adf98ae35ac4dd1dc2556 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Mon, 24 Apr 2017 19:48:51 +0000 Subject: Revert r301231: Accidentally committed stale files I forgot to commit local changes before commit. llvm-svn: 301232 --- llvm/lib/CodeGen/TargetLoweringBase.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp') diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 4d07da8..8d7222f 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1184,11 +1184,12 @@ static unsigned getVectorTypeBreakdownMVT(MVT VT, MVT &IntermediateVT, /// isLegalRC - Return true if the value types that can be represented by the /// specified register class are all legal. -bool TargetLoweringBase::isLegalRC(const TargetRegisterInfo &TRI, - const TargetRegisterClass &RC) const { - for (auto I = TRI.valuetypes_begin(RC); *I != MVT::Other; ++I) +bool TargetLoweringBase::isLegalRC(const TargetRegisterClass *RC) const { + for (TargetRegisterClass::vt_iterator I = RC->vt_begin(), E = RC->vt_end(); + I != E; ++I) { if (isTypeLegal(*I)) return true; + } return false; } @@ -1300,7 +1301,7 @@ TargetLoweringBase::findRepresentativeClass(const TargetRegisterInfo *TRI, // We want the largest possible spill size. if (TRI->getSpillSize(*SuperRC) <= TRI->getSpillSize(*BestRC)) continue; - if (!isLegalRC(*TRI, *SuperRC)) + if (!isLegalRC(SuperRC)) continue; BestRC = SuperRC; } -- cgit v1.1