• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- XCoreRegisterInfo.h - XCore Register Information Impl ---*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the XCore implementation of the MRegisterInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef XCOREREGISTERINFO_H
15 #define XCOREREGISTERINFO_H
16 
17 #include "llvm/Target/TargetRegisterInfo.h"
18 
19 #define GET_REGINFO_HEADER
20 #include "XCoreGenRegisterInfo.inc"
21 
22 namespace llvm {
23 
24 class TargetInstrInfo;
25 
26 struct XCoreRegisterInfo : public XCoreGenRegisterInfo {
27 public:
28   XCoreRegisterInfo();
29 
30   /// Code Generation virtual methods...
31 
32   const MCPhysReg *
33   getCalleeSavedRegs(const MachineFunction *MF =nullptr) const override;
34 
35   BitVector getReservedRegs(const MachineFunction &MF) const override;
36 
37   bool requiresRegisterScavenging(const MachineFunction &MF) const override;
38 
39   bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const override;
40 
41   bool useFPForScavengingIndex(const MachineFunction &MF) const override;
42 
43   void eliminateFrameIndex(MachineBasicBlock::iterator II,
44                            int SPAdj, unsigned FIOperandNum,
45                            RegScavenger *RS = nullptr) const override;
46 
47   // Debug information queries.
48   unsigned getFrameRegister(const MachineFunction &MF) const override;
49 
50   //! Return whether to emit frame moves
51   static bool needsFrameMoves(const MachineFunction &MF);
52 };
53 
54 } // end namespace llvm
55 
56 #endif
57