1 //===-- BPFFrameLowering.cpp - BPF Frame Information ----------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file contains the BPF implementation of TargetFrameLowering class. 11 // 12 //===----------------------------------------------------------------------===// 13 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" 21 22 using namespace llvm; 23 hasFP(const MachineFunction & MF) const24bool BPFFrameLowering::hasFP(const MachineFunction &MF) const { return true; } 25 emitPrologue(MachineFunction & MF) const26void BPFFrameLowering::emitPrologue(MachineFunction &MF) const {} 27 emitEpilogue(MachineFunction & MF,MachineBasicBlock & MBB) const28void BPFFrameLowering::emitEpilogue(MachineFunction &MF, 29 MachineBasicBlock &MBB) const {} 30 processFunctionBeforeCalleeSavedScan(MachineFunction & MF,RegScavenger * RS) const31void BPFFrameLowering::processFunctionBeforeCalleeSavedScan( 32 MachineFunction &MF, RegScavenger *RS) const { 33 MachineRegisterInfo &MRI = MF.getRegInfo(); 34 35 MRI.setPhysRegUnused(BPF::R6); 36 MRI.setPhysRegUnused(BPF::R7); 37 MRI.setPhysRegUnused(BPF::R8); 38 MRI.setPhysRegUnused(BPF::R9); 39 } 40