~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to lib/Target/BPF/BPFFrameLowering.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===-- BPFFrameLowering.h - Define frame lowering for BPF -----*- C++ -*--===//
 
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 class implements BPF-specific bits of TargetFrameLowering class.
 
11
//
 
12
//===----------------------------------------------------------------------===//
 
13
 
 
14
#ifndef LLVM_LIB_TARGET_BPF_BPFFRAMELOWERING_H
 
15
#define LLVM_LIB_TARGET_BPF_BPFFRAMELOWERING_H
 
16
 
 
17
#include "llvm/Target/TargetFrameLowering.h"
 
18
 
 
19
namespace llvm {
 
20
class BPFSubtarget;
 
21
 
 
22
class BPFFrameLowering : public TargetFrameLowering {
 
23
public:
 
24
  explicit BPFFrameLowering(const BPFSubtarget &sti)
 
25
      : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 8, 0) {}
 
26
 
 
27
  void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
 
28
  void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
 
29
 
 
30
  bool hasFP(const MachineFunction &MF) const override;
 
31
  void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
 
32
                            RegScavenger *RS) const override;
 
33
 
 
34
  void
 
35
  eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
 
36
                                MachineBasicBlock::iterator MI) const override {
 
37
    MBB.erase(MI);
 
38
  }
 
39
};
 
40
}
 
41
#endif