[mips] Implement getRepRegClassFor in MipsSETargetLowering. This function is
authorAkira Hatanaka <ahatanaka@mips.com>
Sat, 30 Mar 2013 01:12:05 +0000 (01:12 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Sat, 30 Mar 2013 01:12:05 +0000 (01:12 +0000)
called in several places in ScheduleDAGRRList.cpp.

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

lib/Target/Mips/MipsSEISelLowering.h

index 04a28ce54c133a937534aa3168ce66f106a541f8..e1f949f2475cb06d513c8d5bf9250f2304ed2025 100644 (file)
@@ -15,6 +15,7 @@
 #define MipsSEISELLOWERING_H
 
 #include "MipsISelLowering.h"
+#include "MipsRegisterInfo.h"
 
 namespace llvm {
   class MipsSETargetLowering : public MipsTargetLowering  {
@@ -26,6 +27,14 @@ namespace llvm {
     virtual MachineBasicBlock *
     EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *MBB) const;
 
+    virtual const TargetRegisterClass *getRepRegClassFor(MVT VT) const {
+      if (VT == MVT::Untyped)
+        return Subtarget->hasDSP() ? &Mips::ACRegsDSPRegClass :
+                                     &Mips::ACRegsRegClass;
+
+      return TargetLowering::getRepRegClassFor(VT);
+    }
+
   private:
     virtual bool
     isEligibleForTailCallOptimization(const MipsCC &MipsCCInfo,