You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.4 KiB
42 lines
1.4 KiB
//===-- BPFFrameLowering.h - Define frame lowering for BPF -----*- C++ -*--===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This class implements BPF-specific bits of TargetFrameLowering class.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIB_TARGET_BPF_BPFFRAMELOWERING_H
|
|
#define LLVM_LIB_TARGET_BPF_BPFFRAMELOWERING_H
|
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
|
|
|
namespace llvm {
|
|
class BPFSubtarget;
|
|
|
|
class BPFFrameLowering : public TargetFrameLowering {
|
|
public:
|
|
explicit BPFFrameLowering(const BPFSubtarget &sti)
|
|
: TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 8, 0) {}
|
|
|
|
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
|
|
|
|
bool hasFP(const MachineFunction &MF) const override;
|
|
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
|
|
RegScavenger *RS) const override;
|
|
|
|
MachineBasicBlock::iterator
|
|
eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
|
|
MachineBasicBlock::iterator MI) const override {
|
|
return MBB.erase(MI);
|
|
}
|
|
};
|
|
}
|
|
#endif
|