LLVM  13.0.0git
BPFFrameLowering.h
Go to the documentation of this file.
1 //===-- BPFFrameLowering.h - Define frame lowering for BPF -----*- 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 class implements BPF-specific bits of TargetFrameLowering class.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_BPF_BPFFRAMELOWERING_H
14 #define LLVM_LIB_TARGET_BPF_BPFFRAMELOWERING_H
15 
17 
18 namespace llvm {
19 class BPFSubtarget;
20 
22 public:
23  explicit BPFFrameLowering(const BPFSubtarget &sti)
25 
26  void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
27  void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
28 
29  bool hasFP(const MachineFunction &MF) const override;
30  void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
31  RegScavenger *RS) const override;
32 
35  MachineBasicBlock::iterator MI) const override {
36  return MBB.erase(MI);
37  }
38 };
39 }
40 #endif
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:100
llvm
Definition: AllocatorList.h:23
TargetFrameLowering.h
llvm::TargetFrameLowering
Information about stack frame layout on the target.
Definition: TargetFrameLowering.h:42
llvm::BPFFrameLowering::determineCalleeSaves
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
Definition: BPFFrameLowering.cpp:31
llvm::BPFFrameLowering::eliminateCallFramePseudoInstr
MachineBasicBlock::iterator eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override
This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy p...
Definition: BPFFrameLowering.h:34
llvm::BPFFrameLowering::BPFFrameLowering
BPFFrameLowering(const BPFSubtarget &sti)
Definition: BPFFrameLowering.h:23
llvm::BitVector
Definition: BitVector.h:74
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:95
llvm::BPFFrameLowering::emitEpilogue
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
Definition: BPFFrameLowering.cpp:28
llvm::RegScavenger
Definition: RegisterScavenging.h:34
llvm::MachineFunction
Definition: MachineFunction.h:230
llvm::BPFFrameLowering
Definition: BPFFrameLowering.h:21
MBB
MachineBasicBlock & MBB
Definition: AArch64SLSHardening.cpp:74
llvm::BPFFrameLowering::emitPrologue
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
Definition: BPFFrameLowering.cpp:25
llvm::BPFFrameLowering::hasFP
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register.
Definition: BPFFrameLowering.cpp:23
llvm::TargetFrameLowering::StackGrowsDown
@ StackGrowsDown
Definition: TargetFrameLowering.h:46
llvm::MachineInstrBundleIterator< MachineInstr >
llvm::BPFSubtarget
Definition: BPFSubtarget.h:31