forked from OSchip/llvm-project
Implement SystemZRegisterInfo::getMatchingSuperRegClass to enable cross-class joins.
llvm-svn: 130857
This commit is contained in:
parent
e7528c45ea
commit
093a94cdae
|
@ -58,6 +58,20 @@ BitVector SystemZRegisterInfo::getReservedRegs(const MachineFunction &MF) const
|
||||||
return Reserved;
|
return Reserved;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TargetRegisterClass*
|
||||||
|
SystemZRegisterInfo::getMatchingSuperRegClass(const TargetRegisterClass *A,
|
||||||
|
const TargetRegisterClass *B,
|
||||||
|
unsigned Idx) const {
|
||||||
|
switch(Idx) {
|
||||||
|
// Exact sub-classes don't exist for the other sub-register indexes.
|
||||||
|
default: return 0;
|
||||||
|
case SystemZ::subreg_32bit:
|
||||||
|
if (B == SystemZ::ADDR32RegisterClass)
|
||||||
|
return A->getSize() == 8 ? SystemZ::ADDR64RegisterClass : 0;
|
||||||
|
return A;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SystemZRegisterInfo::
|
void SystemZRegisterInfo::
|
||||||
eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
|
eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
|
||||||
MachineBasicBlock::iterator I) const {
|
MachineBasicBlock::iterator I) const {
|
||||||
|
|
|
@ -34,6 +34,10 @@ struct SystemZRegisterInfo : public SystemZGenRegisterInfo {
|
||||||
|
|
||||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||||
|
|
||||||
|
const TargetRegisterClass*
|
||||||
|
getMatchingSuperRegClass(const TargetRegisterClass *A,
|
||||||
|
const TargetRegisterClass *B, unsigned Idx) const;
|
||||||
|
|
||||||
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
||||||
MachineBasicBlock &MBB,
|
MachineBasicBlock &MBB,
|
||||||
MachineBasicBlock::iterator I) const;
|
MachineBasicBlock::iterator I) const;
|
||||||
|
|
Loading…
Reference in New Issue