1 //===-- XCoreRegisterInfo.h - XCore Register Information Impl ---*- C++ -*-===// 2 // 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 6 // 7 //===----------------------------------------------------------------------===// 8 // 9 // This file contains the XCore implementation of the MRegisterInfo class. 10 // 11 //===----------------------------------------------------------------------===// 12 13 #ifndef LLVM_LIB_TARGET_XCORE_XCOREREGISTERINFO_H 14 #define LLVM_LIB_TARGET_XCORE_XCOREREGISTERINFO_H 15 16 #include "llvm/CodeGen/TargetRegisterInfo.h" 17 18 #define GET_REGINFO_HEADER 19 #include "XCoreGenRegisterInfo.inc" 20 21 namespace llvm { 22 23 struct XCoreRegisterInfo : public XCoreGenRegisterInfo { 24 public: 25 XCoreRegisterInfo(); 26 27 /// Code Generation virtual methods... 28 29 const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override; 30 31 BitVector getReservedRegs(const MachineFunction &MF) const override; 32 33 bool requiresRegisterScavenging(const MachineFunction &MF) const override; 34 35 bool useFPForScavengingIndex(const MachineFunction &MF) const override; 36 37 bool supportsBackwardScavenger() const override { return true; } 38 39 bool eliminateFrameIndex(MachineBasicBlock::iterator II, 40 int SPAdj, unsigned FIOperandNum, 41 RegScavenger *RS = nullptr) const override; 42 43 // Debug information queries. 44 Register getFrameRegister(const MachineFunction &MF) const override; 45 46 //! Return whether to emit frame moves 47 static bool needsFrameMoves(const MachineFunction &MF); 48 }; 49 50 } // end namespace llvm 51 52 #endif 53