mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Add ARM getMatchingSuperRegClass to handle S / D / Q cross regclass coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85049 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ed3ad212ec
commit
4f54c1293a
@ -253,6 +253,33 @@ bool ARMBaseRegisterInfo::isReservedReg(const MachineFunction &MF,
|
||||
return false;
|
||||
}
|
||||
|
||||
const TargetRegisterClass *
|
||||
ARMBaseRegisterInfo::getMatchingSuperRegClass(const TargetRegisterClass *A,
|
||||
const TargetRegisterClass *B,
|
||||
unsigned SubIdx) const {
|
||||
switch (SubIdx) {
|
||||
default: return 0;
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
// S sub-registers.
|
||||
if (A->getSize() == 8) {
|
||||
if (A == &ARM::DPR_8RegClass)
|
||||
return A;
|
||||
return &ARM::DPR_VFP2RegClass;
|
||||
}
|
||||
|
||||
assert(A->getSize() == 16 && "Expecting a Q register class!");
|
||||
return &ARM::QPR_VFP2RegClass;
|
||||
case 5:
|
||||
case 6:
|
||||
// D sub-registers.
|
||||
return A;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
const TargetRegisterClass *
|
||||
ARMBaseRegisterInfo::getPointerRegClass(unsigned Kind) const {
|
||||
return ARM::GPRRegisterClass;
|
||||
|
@ -74,6 +74,13 @@ public:
|
||||
|
||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||
|
||||
/// getMatchingSuperRegClass - Return a subclass of the specified register
|
||||
/// class A so that each register in it has a sub-register of the
|
||||
/// specified sub-register index which is in the specified register class B.
|
||||
virtual const TargetRegisterClass *
|
||||
getMatchingSuperRegClass(const TargetRegisterClass *A,
|
||||
const TargetRegisterClass *B, unsigned Idx) const;
|
||||
|
||||
const TargetRegisterClass *getPointerRegClass(unsigned Kind = 0) const;
|
||||
|
||||
std::pair<TargetRegisterClass::iterator,TargetRegisterClass::iterator>
|
||||
|
Loading…
x
Reference in New Issue
Block a user