forked from OSchip/llvm-project
De-virtualize or remove some methods that have no overrides nor override anything. In some cases remove all together if there are no callers either.
llvm-svn: 207610
This commit is contained in:
parent
ef550a6d01
commit
ee7b0f3956
|
@ -84,13 +84,6 @@ NVPTXRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||||
return CalleeSavedRegs;
|
return CalleeSavedRegs;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NVPTX Callee Saved Reg Classes
|
|
||||||
const TargetRegisterClass *const *
|
|
||||||
NVPTXRegisterInfo::getCalleeSavedRegClasses(const MachineFunction *MF) const {
|
|
||||||
static const TargetRegisterClass *const CalleeSavedRegClasses[] = { nullptr };
|
|
||||||
return CalleeSavedRegClasses;
|
|
||||||
}
|
|
||||||
|
|
||||||
BitVector NVPTXRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
|
BitVector NVPTXRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
|
||||||
BitVector Reserved(getNumRegs());
|
BitVector Reserved(getNumRegs());
|
||||||
return Reserved;
|
return Reserved;
|
||||||
|
@ -113,12 +106,6 @@ void NVPTXRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
|
||||||
MI.getOperand(FIOperandNum + 1).ChangeToImmediate(Offset);
|
MI.getOperand(FIOperandNum + 1).ChangeToImmediate(Offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
int NVPTXRegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned NVPTXRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
|
unsigned NVPTXRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
|
||||||
return NVPTX::VRFrame;
|
return NVPTX::VRFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned NVPTXRegisterInfo::getRARegister() const { return 0; }
|
|
||||||
|
|
|
@ -44,19 +44,13 @@ public:
|
||||||
const MCPhysReg *
|
const MCPhysReg *
|
||||||
getCalleeSavedRegs(const MachineFunction *MF = nullptr) const override;
|
getCalleeSavedRegs(const MachineFunction *MF = nullptr) const override;
|
||||||
|
|
||||||
// NVPTX callee saved register classes
|
|
||||||
virtual const TargetRegisterClass *const *
|
|
||||||
getCalleeSavedRegClasses(const MachineFunction *MF) const final;
|
|
||||||
|
|
||||||
BitVector getReservedRegs(const MachineFunction &MF) const override;
|
BitVector getReservedRegs(const MachineFunction &MF) const override;
|
||||||
|
|
||||||
void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,
|
void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,
|
||||||
unsigned FIOperandNum,
|
unsigned FIOperandNum,
|
||||||
RegScavenger *RS = nullptr) const override;
|
RegScavenger *RS = nullptr) const override;
|
||||||
|
|
||||||
virtual int getDwarfRegNum(unsigned RegNum, bool isEH) const final;
|
|
||||||
unsigned getFrameRegister(const MachineFunction &MF) const override;
|
unsigned getFrameRegister(const MachineFunction &MF) const override;
|
||||||
virtual unsigned getRARegister() const final;
|
|
||||||
|
|
||||||
ManagedStringPool *getStrPool() const {
|
ManagedStringPool *getStrPool() const {
|
||||||
return const_cast<ManagedStringPool *>(&ManagedStrPool);
|
return const_cast<ManagedStringPool *>(&ManagedStrPool);
|
||||||
|
|
|
@ -227,7 +227,7 @@ public:
|
||||||
/// GetInstSize - Return the number of bytes of code the specified
|
/// GetInstSize - Return the number of bytes of code the specified
|
||||||
/// instruction may be. This returns the maximum number of bytes.
|
/// instruction may be. This returns the maximum number of bytes.
|
||||||
///
|
///
|
||||||
virtual unsigned GetInstSizeInBytes(const MachineInstr *MI) const final;
|
unsigned GetInstSizeInBytes(const MachineInstr *MI) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
|
|
||||||
/// \returns The number of 32-bit sub-registers that are used when storing
|
/// \returns The number of 32-bit sub-registers that are used when storing
|
||||||
/// values to the stack.
|
/// values to the stack.
|
||||||
virtual unsigned getStackWidth(const MachineFunction &MF) const final;
|
unsigned getStackWidth(const MachineFunction &MF) const;
|
||||||
int getFrameIndexOffset(const MachineFunction &MF, int FI) const override;
|
int getFrameIndexOffset(const MachineFunction &MF, int FI) const override;
|
||||||
const SpillSlot *
|
const SpillSlot *
|
||||||
getCalleeSavedSpillSlots(unsigned &NumEntries) const override;
|
getCalleeSavedSpillSlots(unsigned &NumEntries) const override;
|
||||||
|
|
|
@ -103,11 +103,11 @@ protected:
|
||||||
MachineInstr *LoadMI) const override;
|
MachineInstr *LoadMI) const override;
|
||||||
/// \returns the smallest register index that will be accessed by an indirect
|
/// \returns the smallest register index that will be accessed by an indirect
|
||||||
/// read or write or -1 if indirect addressing is not used by this program.
|
/// read or write or -1 if indirect addressing is not used by this program.
|
||||||
virtual int getIndirectIndexBegin(const MachineFunction &MF) const final;
|
int getIndirectIndexBegin(const MachineFunction &MF) const;
|
||||||
|
|
||||||
/// \returns the largest register index that will be accessed by an indirect
|
/// \returns the largest register index that will be accessed by an indirect
|
||||||
/// read or write or -1 if indirect addressing is not used by this program.
|
/// read or write or -1 if indirect addressing is not used by this program.
|
||||||
virtual int getIndirectIndexEnd(const MachineFunction &MF) const final;
|
int getIndirectIndexEnd(const MachineFunction &MF) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool canFoldMemoryOperand(const MachineInstr *MI,
|
bool canFoldMemoryOperand(const MachineInstr *MI,
|
||||||
|
@ -188,8 +188,7 @@ public:
|
||||||
|
|
||||||
/// \brief Convert the AMDIL MachineInstr to a supported ISA
|
/// \brief Convert the AMDIL MachineInstr to a supported ISA
|
||||||
/// MachineInstr
|
/// MachineInstr
|
||||||
virtual void convertToISA(MachineInstr & MI, MachineFunction &MF,
|
void convertToISA(MachineInstr & MI, MachineFunction &MF, DebugLoc DL) const;
|
||||||
DebugLoc DL) const final;
|
|
||||||
|
|
||||||
/// \brief Build a MOV instruction.
|
/// \brief Build a MOV instruction.
|
||||||
virtual MachineInstr *buildMovInstr(MachineBasicBlock *MBB,
|
virtual MachineInstr *buildMovInstr(MachineBasicBlock *MBB,
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
AMDGPUSubtarget(StringRef TT, StringRef CPU, StringRef FS);
|
AMDGPUSubtarget(StringRef TT, StringRef CPU, StringRef FS);
|
||||||
|
|
||||||
const InstrItineraryData &getInstrItineraryData() const { return InstrItins; }
|
const InstrItineraryData &getInstrItineraryData() const { return InstrItins; }
|
||||||
virtual void ParseSubtargetFeatures(StringRef CPU, StringRef FS) final;
|
void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||||
|
|
||||||
bool is64bit() const;
|
bool is64bit() const;
|
||||||
bool hasVertexCache() const;
|
bool hasVertexCache() const;
|
||||||
|
|
|
@ -49,7 +49,7 @@ struct R600RegisterInfo : public AMDGPURegisterInfo {
|
||||||
getRegClassWeight(const TargetRegisterClass *RC) const override;
|
getRegClassWeight(const TargetRegisterClass *RC) const override;
|
||||||
|
|
||||||
// \returns true if \p Reg can be defined in one ALU caluse and used in another.
|
// \returns true if \p Reg can be defined in one ALU caluse and used in another.
|
||||||
virtual bool isPhysRegLiveAcrossClauses(unsigned Reg) const final;
|
bool isPhysRegLiveAcrossClauses(unsigned Reg) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End namespace llvm
|
} // End namespace llvm
|
||||||
|
|
Loading…
Reference in New Issue