summaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-04-24 19:48:51 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-04-24 19:48:51 +0000
commit031e2c7f67b7681119289cf9ccb103aa8963641a (patch)
tree343a0147793f03accbce568fc26007ae5f5e64fc /lib/CodeGen/TargetLoweringBase.cpp
parenta23ad66819bbddc283c89dc3996dee7d89f70a0f (diff)
Revert r301231: Accidentally committed stale files
I forgot to commit local changes before commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301232 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r--lib/CodeGen/TargetLoweringBase.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/CodeGen/TargetLoweringBase.cpp b/lib/CodeGen/TargetLoweringBase.cpp
index 4d07da80b90..8d7222fb5b2 100644
--- a/lib/CodeGen/TargetLoweringBase.cpp
+++ b/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;
}