BPFRegisterInfo.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //===-- BPFRegisterInfo.h - BPF 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 BPF implementation of the TargetRegisterInfo class.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #ifndef LLVM_LIB_TARGET_BPF_BPFREGISTERINFO_H
  13. #define LLVM_LIB_TARGET_BPF_BPFREGISTERINFO_H
  14. #include "llvm/CodeGen/TargetRegisterInfo.h"
  15. #define GET_REGINFO_HEADER
  16. #include "BPFGenRegisterInfo.inc"
  17. namespace llvm {
  18. struct BPFRegisterInfo : public BPFGenRegisterInfo {
  19. BPFRegisterInfo();
  20. const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;
  21. BitVector getReservedRegs(const MachineFunction &MF) const override;
  22. void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,
  23. unsigned FIOperandNum,
  24. RegScavenger *RS = nullptr) const override;
  25. Register getFrameRegister(const MachineFunction &MF) const override;
  26. };
  27. }
  28. #endif