diff options
author | attilio <attilio@FreeBSD.org> | 2011-10-22 22:56:20 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-10-22 22:56:20 +0000 |
commit | 4be1d1f7d25274261562ad10fb8197d48da0d113 (patch) | |
tree | a5939a4eeef7c173fb98194a6a23499c9b5a561d /contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp | |
parent | 62842622e5f4dd7e394cb2530b955c9818aaeec0 (diff) | |
parent | d5b30f0715769670b0cb9e859e79e85cc990f441 (diff) | |
download | FreeBSD-src-4be1d1f7d25274261562ad10fb8197d48da0d113.zip FreeBSD-src-4be1d1f7d25274261562ad10fb8197d48da0d113.tar.gz |
MFC
Diffstat (limited to 'contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp')
-rw-r--r-- | contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp b/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp index 5a77e47..786d279 100644 --- a/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp +++ b/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp @@ -99,11 +99,16 @@ void RegisterClassInfo::compute(const TargetRegisterClass *RC) const { // CSR aliases go after the volatile registers, preserve the target's order. std::copy(CSRAlias.begin(), CSRAlias.end(), &RCI.Order[N]); + // Check if RC is a proper sub-class. + if (const TargetRegisterClass *Super = TRI->getLargestLegalSuperClass(RC)) + if (Super != RC && getNumAllocatableRegs(Super) > RCI.NumRegs) + RCI.ProperSubClass = true; + DEBUG({ dbgs() << "AllocationOrder(" << RC->getName() << ") = ["; for (unsigned I = 0; I != RCI.NumRegs; ++I) dbgs() << ' ' << PrintReg(RCI.Order[I], TRI); - dbgs() << " ]\n"; + dbgs() << (RCI.ProperSubClass ? " ] (sub-class)\n" : " ]\n"); }); // RCI is now up-to-date. |