1349cc55cSDimitry Andric //===-- CSKYRegisterInfo.h - CSKY Register Information Impl ---*- C++ -*---===// 2349cc55cSDimitry Andric // 3349cc55cSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4349cc55cSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5349cc55cSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6349cc55cSDimitry Andric // 7349cc55cSDimitry Andric //===----------------------------------------------------------------------===// 8349cc55cSDimitry Andric // 9349cc55cSDimitry Andric // This file contains the CSKY implementation of the TargetRegisterInfo class. 10349cc55cSDimitry Andric // 11349cc55cSDimitry Andric //===----------------------------------------------------------------------===// 12349cc55cSDimitry Andric 13349cc55cSDimitry Andric #ifndef LLVM_LIB_TARGET_CSKY_CSKYREGISTERINFO_H 14349cc55cSDimitry Andric #define LLVM_LIB_TARGET_CSKY_CSKYREGISTERINFO_H 15349cc55cSDimitry Andric 16349cc55cSDimitry Andric #include "llvm/CodeGen/TargetRegisterInfo.h" 17349cc55cSDimitry Andric 18349cc55cSDimitry Andric #define GET_REGINFO_HEADER 19349cc55cSDimitry Andric #include "CSKYGenRegisterInfo.inc" 20349cc55cSDimitry Andric 21349cc55cSDimitry Andric namespace llvm { 22349cc55cSDimitry Andric class CSKYInstrInfo; 23349cc55cSDimitry Andric 24349cc55cSDimitry Andric class CSKYRegisterInfo : public CSKYGenRegisterInfo { 25349cc55cSDimitry Andric public: 26349cc55cSDimitry Andric CSKYRegisterInfo(); 27349cc55cSDimitry Andric 28349cc55cSDimitry Andric const uint32_t *getCallPreservedMask(const MachineFunction &MF, 29349cc55cSDimitry Andric CallingConv::ID id) const override; 30349cc55cSDimitry Andric const uint32_t *getNoPreservedMask() const override; 31349cc55cSDimitry Andric 32349cc55cSDimitry Andric BitVector getReservedRegs(const MachineFunction &MF) const override; 33349cc55cSDimitry Andric 34349cc55cSDimitry Andric Register getFrameRegister(const MachineFunction &MF) const override; 35349cc55cSDimitry Andric 36349cc55cSDimitry Andric const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override; 37349cc55cSDimitry Andric 38*bdd1243dSDimitry Andric bool eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, 39349cc55cSDimitry Andric unsigned FIOperandNum, 40349cc55cSDimitry Andric RegScavenger *RS) const override; 410eae32dcSDimitry Andric requiresFrameIndexScavenging(const MachineFunction & MF)420eae32dcSDimitry Andric bool requiresFrameIndexScavenging(const MachineFunction &MF) const override { 430eae32dcSDimitry Andric return true; 440eae32dcSDimitry Andric } 450eae32dcSDimitry Andric requiresRegisterScavenging(const MachineFunction & MF)460eae32dcSDimitry Andric bool requiresRegisterScavenging(const MachineFunction &MF) const override { 470eae32dcSDimitry Andric return true; 480eae32dcSDimitry Andric } 490eae32dcSDimitry Andric useFPForScavengingIndex(const MachineFunction & MF)500eae32dcSDimitry Andric bool useFPForScavengingIndex(const MachineFunction &MF) const override { 510eae32dcSDimitry Andric return false; 520eae32dcSDimitry Andric } 53349cc55cSDimitry Andric }; 54349cc55cSDimitry Andric 55349cc55cSDimitry Andric } // namespace llvm 56349cc55cSDimitry Andric 57349cc55cSDimitry Andric #endif // LLVM_LIB_TARGET_CSKY_CSKYREGISTERINFO_H 58