1 //===-- BPFFrameLowering.cpp - BPF Frame Information ----------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the BPF implementation of TargetFrameLowering class.
12 //===----------------------------------------------------------------------===//
14 #include "BPFFrameLowering.h"
15 #include "BPFInstrInfo.h"
16 #include "BPFSubtarget.h"
17 #include "llvm/CodeGen/MachineFrameInfo.h"
18 #include "llvm/CodeGen/MachineFunction.h"
19 #include "llvm/CodeGen/MachineInstrBuilder.h"
20 #include "llvm/CodeGen/MachineRegisterInfo.h"
24 bool BPFFrameLowering::hasFP(const MachineFunction &MF) const { return true; }
26 void BPFFrameLowering::emitPrologue(MachineFunction &MF) const {}
28 void BPFFrameLowering::emitEpilogue(MachineFunction &MF,
29 MachineBasicBlock &MBB) const {}
31 void BPFFrameLowering::processFunctionBeforeCalleeSavedScan(
32 MachineFunction &MF, RegScavenger *RS) const {
33 MachineRegisterInfo &MRI = MF.getRegInfo();
35 MRI.setPhysRegUnused(BPF::R6);
36 MRI.setPhysRegUnused(BPF::R7);
37 MRI.setPhysRegUnused(BPF::R8);
38 MRI.setPhysRegUnused(BPF::R9);