BPFFrameLowering.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //===-- BPFFrameLowering.cpp - BPF Frame Information ----------------------===//
  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 TargetFrameLowering class.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #include "BPFFrameLowering.h"
  13. #include "BPFInstrInfo.h"
  14. #include "BPFSubtarget.h"
  15. #include "llvm/CodeGen/MachineFrameInfo.h"
  16. #include "llvm/CodeGen/MachineFunction.h"
  17. #include "llvm/CodeGen/MachineInstrBuilder.h"
  18. #include "llvm/CodeGen/MachineRegisterInfo.h"
  19. using namespace llvm;
  20. bool BPFFrameLowering::hasFP(const MachineFunction &MF) const { return true; }
  21. void BPFFrameLowering::emitPrologue(MachineFunction &MF,
  22. MachineBasicBlock &MBB) const {}
  23. void BPFFrameLowering::emitEpilogue(MachineFunction &MF,
  24. MachineBasicBlock &MBB) const {}
  25. void BPFFrameLowering::determineCalleeSaves(MachineFunction &MF,
  26. BitVector &SavedRegs,
  27. RegScavenger *RS) const {
  28. TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS);
  29. SavedRegs.reset(BPF::R6);
  30. SavedRegs.reset(BPF::R7);
  31. SavedRegs.reset(BPF::R8);
  32. SavedRegs.reset(BPF::R9);
  33. }