mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Reduce usage of MRegisterInfo::getRegClass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17238 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4a0de07e78
commit
ad3c74fc9b
@ -658,15 +658,16 @@ void LiveIntervals::joinIntervals() {
|
||||
/// classes. The registers may be either phys or virt regs.
|
||||
bool LiveIntervals::differingRegisterClasses(unsigned RegA,
|
||||
unsigned RegB) const {
|
||||
const TargetRegisterClass *RegClass;
|
||||
|
||||
// Get the register classes for the first reg.
|
||||
if (MRegisterInfo::isVirtualRegister(RegA))
|
||||
RegClass = mf_->getSSARegMap()->getRegClass(RegA);
|
||||
else
|
||||
RegClass = mri_->getRegClass(RegA);
|
||||
if (MRegisterInfo::isPhysicalRegister(RegA)) {
|
||||
assert(MRegisterInfo::isVirtualRegister(RegB) &&
|
||||
"Shouldn't consider two physregs!");
|
||||
return !mf_->getSSARegMap()->getRegClass(RegB)->contains(RegA);
|
||||
}
|
||||
|
||||
// Compare against the regclass for the second reg.
|
||||
const TargetRegisterClass *RegClass = mf_->getSSARegMap()->getRegClass(RegA);
|
||||
if (MRegisterInfo::isVirtualRegister(RegB))
|
||||
return RegClass != mf_->getSSARegMap()->getRegClass(RegB);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user