1e4c8c807SAlexei Starovoitov //===-- BPFFrameLowering.cpp - BPF Frame Information ----------------------===//
2e4c8c807SAlexei Starovoitov //
3*2946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*2946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
5*2946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6e4c8c807SAlexei Starovoitov //
7e4c8c807SAlexei Starovoitov //===----------------------------------------------------------------------===//
8e4c8c807SAlexei Starovoitov //
9e4c8c807SAlexei Starovoitov // This file contains the BPF implementation of TargetFrameLowering class.
10e4c8c807SAlexei Starovoitov //
11e4c8c807SAlexei Starovoitov //===----------------------------------------------------------------------===//
12e4c8c807SAlexei Starovoitov
13e4c8c807SAlexei Starovoitov #include "BPFFrameLowering.h"
14e4c8c807SAlexei Starovoitov #include "BPFInstrInfo.h"
15e4c8c807SAlexei Starovoitov #include "BPFSubtarget.h"
16e4c8c807SAlexei Starovoitov #include "llvm/CodeGen/MachineFrameInfo.h"
17e4c8c807SAlexei Starovoitov #include "llvm/CodeGen/MachineFunction.h"
18e4c8c807SAlexei Starovoitov #include "llvm/CodeGen/MachineInstrBuilder.h"
19e4c8c807SAlexei Starovoitov #include "llvm/CodeGen/MachineRegisterInfo.h"
20e4c8c807SAlexei Starovoitov
21e4c8c807SAlexei Starovoitov using namespace llvm;
22e4c8c807SAlexei Starovoitov
hasFP(const MachineFunction & MF) const23e4c8c807SAlexei Starovoitov bool BPFFrameLowering::hasFP(const MachineFunction &MF) const { return true; }
24e4c8c807SAlexei Starovoitov
emitPrologue(MachineFunction & MF,MachineBasicBlock & MBB) const2561b305edSQuentin Colombet void BPFFrameLowering::emitPrologue(MachineFunction &MF,
2661b305edSQuentin Colombet MachineBasicBlock &MBB) const {}
27e4c8c807SAlexei Starovoitov
emitEpilogue(MachineFunction & MF,MachineBasicBlock & MBB) const28e4c8c807SAlexei Starovoitov void BPFFrameLowering::emitEpilogue(MachineFunction &MF,
29e4c8c807SAlexei Starovoitov MachineBasicBlock &MBB) const {}
30e4c8c807SAlexei Starovoitov
determineCalleeSaves(MachineFunction & MF,BitVector & SavedRegs,RegScavenger * RS) const3102564865SMatthias Braun void BPFFrameLowering::determineCalleeSaves(MachineFunction &MF,
3202564865SMatthias Braun BitVector &SavedRegs,
3302564865SMatthias Braun RegScavenger *RS) const {
3402564865SMatthias Braun TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS);
3502564865SMatthias Braun SavedRegs.reset(BPF::R6);
3602564865SMatthias Braun SavedRegs.reset(BPF::R7);
3702564865SMatthias Braun SavedRegs.reset(BPF::R8);
3802564865SMatthias Braun SavedRegs.reset(BPF::R9);
39e4c8c807SAlexei Starovoitov }
40