LLVM  13.0.0git
BPFFrameLowering.cpp
Go to the documentation of this file.
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 
13 #include "BPFFrameLowering.h"
14 #include "BPFInstrInfo.h"
15 #include "BPFSubtarget.h"
20 
21 using namespace llvm;
22 
23 bool BPFFrameLowering::hasFP(const MachineFunction &MF) const { return true; }
24 
26  MachineBasicBlock &MBB) const {}
27 
29  MachineBasicBlock &MBB) const {}
30 
32  BitVector &SavedRegs,
33  RegScavenger *RS) const {
35  SavedRegs.reset(BPF::R6);
36  SavedRegs.reset(BPF::R7);
37  SavedRegs.reset(BPF::R8);
38  SavedRegs.reset(BPF::R9);
39 }
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
BPFSubtarget.h
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
MachineRegisterInfo.h
llvm::BitVector
Definition: BitVector.h:74
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
R6
#define R6(n)
llvm::MachineFunction
Definition: MachineFunction.h:230
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
MachineFrameInfo.h
llvm::BitVector::reset
BitVector & reset()
Definition: BitVector.h:384
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
MachineInstrBuilder.h
BPFFrameLowering.h
llvm::TargetFrameLowering::determineCalleeSaves
virtual void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
Definition: TargetFrameLoweringImpl.cpp:78
MachineFunction.h
BPFInstrInfo.h