1 //===-- XCoreRegisterInfo.h - XCore Register Information Impl ---*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file contains the XCore implementation of the MRegisterInfo class.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_XCORE_XCOREREGISTERINFO_H
14 #define LLVM_LIB_TARGET_XCORE_XCOREREGISTERINFO_H
16 #include "llvm/CodeGen/TargetRegisterInfo.h"
18 #define GET_REGINFO_HEADER
19 #include "XCoreGenRegisterInfo.inc"
23 struct XCoreRegisterInfo
: public XCoreGenRegisterInfo
{
27 /// Code Generation virtual methods...
29 const MCPhysReg
*getCalleeSavedRegs(const MachineFunction
*MF
) const override
;
31 BitVector
getReservedRegs(const MachineFunction
&MF
) const override
;
33 bool requiresRegisterScavenging(const MachineFunction
&MF
) const override
;
35 bool useFPForScavengingIndex(const MachineFunction
&MF
) const override
;
37 bool eliminateFrameIndex(MachineBasicBlock::iterator II
,
38 int SPAdj
, unsigned FIOperandNum
,
39 RegScavenger
*RS
= nullptr) const override
;
41 // Debug information queries.
42 Register
getFrameRegister(const MachineFunction
&MF
) const override
;
44 //! Return whether to emit frame moves
45 static bool needsFrameMoves(const MachineFunction
&MF
);
48 } // end namespace llvm