forked from OSchip/llvm-project
				
			Reduce usage of MRegisterInfo::getRegClass
llvm-svn: 17238
This commit is contained in:
		
							parent
							
								
									4c6e1d694c
								
							
						
					
					
						commit
						b56cb729bd
					
				| 
						 | 
					@ -658,15 +658,16 @@ void LiveIntervals::joinIntervals() {
 | 
				
			||||||
/// classes.  The registers may be either phys or virt regs.
 | 
					/// classes.  The registers may be either phys or virt regs.
 | 
				
			||||||
bool LiveIntervals::differingRegisterClasses(unsigned RegA,
 | 
					bool LiveIntervals::differingRegisterClasses(unsigned RegA,
 | 
				
			||||||
                                             unsigned RegB) const {
 | 
					                                             unsigned RegB) const {
 | 
				
			||||||
  const TargetRegisterClass *RegClass;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Get the register classes for the first reg.
 | 
					  // Get the register classes for the first reg.
 | 
				
			||||||
  if (MRegisterInfo::isVirtualRegister(RegA))
 | 
					  if (MRegisterInfo::isPhysicalRegister(RegA)) {
 | 
				
			||||||
    RegClass = mf_->getSSARegMap()->getRegClass(RegA);
 | 
					    assert(MRegisterInfo::isVirtualRegister(RegB) && 
 | 
				
			||||||
  else
 | 
					           "Shouldn't consider two physregs!");
 | 
				
			||||||
    RegClass = mri_->getRegClass(RegA);
 | 
					    return !mf_->getSSARegMap()->getRegClass(RegB)->contains(RegA);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Compare against the regclass for the second reg.
 | 
					  // Compare against the regclass for the second reg.
 | 
				
			||||||
 | 
					  const TargetRegisterClass *RegClass = mf_->getSSARegMap()->getRegClass(RegA);
 | 
				
			||||||
  if (MRegisterInfo::isVirtualRegister(RegB))
 | 
					  if (MRegisterInfo::isVirtualRegister(RegB))
 | 
				
			||||||
    return RegClass != mf_->getSSARegMap()->getRegClass(RegB);
 | 
					    return RegClass != mf_->getSSARegMap()->getRegClass(RegB);
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue