]> granicus.if.org Git - llvm/commitdiff
Virtualize TargetInstrInfo::getRegClass()
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Thu, 20 Jun 2019 14:59:28 +0000 (14:59 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Thu, 20 Jun 2019 14:59:28 +0000 (14:59 +0000)
AMDGPU target needs to override getRegClass() used during
instruction selection. We now may have either 32 or 64 bit
conditional registers used in the same instructions. For
that purpose special SReg_1 register class is created which
is dynamically resolved to either SReg_64 or SGPR_32 depending
on the subtarget attributes.

Differential Revision: https://reviews.llvm.org/D63205

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363931 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/TargetInstrInfo.h

index 20c4934c7d5ecea94d317e398f567363932d9b75..25b04f8c019aa152b517157c82096d8cc56d9e11 100644 (file)
@@ -81,6 +81,7 @@ public:
 
   /// Given a machine instruction descriptor, returns the register
   /// class constraint for OpNum, or NULL.
+  virtual
   const TargetRegisterClass *getRegClass(const MCInstrDesc &MCID, unsigned OpNum,
                                          const TargetRegisterInfo *TRI,
                                          const MachineFunction &MF) const;