Path: blob/main/contrib/llvm-project/llvm/lib/Target/BPF/BPFFrameLowering.h
35269 views
//===-- BPFFrameLowering.h - Define frame lowering for BPF -----*- C++ -*--===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This class implements BPF-specific bits of TargetFrameLowering class.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_BPF_BPFFRAMELOWERING_H13#define LLVM_LIB_TARGET_BPF_BPFFRAMELOWERING_H1415#include "llvm/CodeGen/TargetFrameLowering.h"1617namespace llvm {18class BPFSubtarget;1920class BPFFrameLowering : public TargetFrameLowering {21public:22explicit BPFFrameLowering(const BPFSubtarget &sti)23: TargetFrameLowering(TargetFrameLowering::StackGrowsDown, Align(8), 0) {}2425void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;26void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;2728bool hasFP(const MachineFunction &MF) const override;29void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,30RegScavenger *RS) const override;3132MachineBasicBlock::iterator33eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,34MachineBasicBlock::iterator MI) const override {35return MBB.erase(MI);36}37};38}39#endif404142