1 //===-- BPFRegisterInfo.h - BPF 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 BPF implementation of the TargetRegisterInfo class. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef LLVM_LIB_TARGET_BPF_BPFREGISTERINFO_H 15 #define LLVM_LIB_TARGET_BPF_BPFREGISTERINFO_H 16 17 #include "llvm/CodeGen/TargetRegisterInfo.h" 18 19 #define GET_REGINFO_HEADER 20 #include "BPFGenRegisterInfo.inc" 21 22 namespace llvm { 23 24 struct BPFRegisterInfo : public BPFGenRegisterInfo { 25 26 BPFRegisterInfo(); 27 28 const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override; 29 30 BitVector getReservedRegs(const MachineFunction &MF) const override; 31 enableMultipleCopyHintsBPFRegisterInfo32 bool enableMultipleCopyHints() const override { return true; } 33 34 void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj, 35 unsigned FIOperandNum, 36 RegScavenger *RS = nullptr) const override; 37 38 unsigned getFrameRegister(const MachineFunction &MF) const override; 39 }; 40 } 41 42 #endif 43