LLVM  6.0.0svn
BPFInstrInfo.h
Go to the documentation of this file.
1 //===-- BPFInstrInfo.h - BPF Instruction Information ------------*- 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 file contains the BPF implementation of the TargetInstrInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_BPF_BPFINSTRINFO_H
15 #define LLVM_LIB_TARGET_BPF_BPFINSTRINFO_H
16 
17 #include "BPFRegisterInfo.h"
19 
20 #define GET_INSTRINFO_HEADER
21 #include "BPFGenInstrInfo.inc"
22 
23 namespace llvm {
24 
25 class BPFInstrInfo : public BPFGenInstrInfo {
26  const BPFRegisterInfo RI;
27 
28 public:
29  BPFInstrInfo();
30 
31  const BPFRegisterInfo &getRegisterInfo() const { return RI; }
32 
34  const DebugLoc &DL, unsigned DestReg, unsigned SrcReg,
35  bool KillSrc) const override;
36 
38  MachineBasicBlock::iterator MBBI, unsigned SrcReg,
39  bool isKill, int FrameIndex,
40  const TargetRegisterClass *RC,
41  const TargetRegisterInfo *TRI) const override;
42 
44  MachineBasicBlock::iterator MBBI, unsigned DestReg,
45  int FrameIndex, const TargetRegisterClass *RC,
46  const TargetRegisterInfo *TRI) const override;
48  MachineBasicBlock *&FBB,
50  bool AllowModify) const override;
51 
52  unsigned removeBranch(MachineBasicBlock &MBB,
53  int *BytesRemoved = nullptr) const override;
56  const DebugLoc &DL,
57  int *BytesAdded = nullptr) const override;
58 };
59 }
60 
61 #endif
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const override
unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
A debug info location.
Definition: DebugLoc.h:34
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:42
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:33
unsigned removeBranch(MachineBasicBlock &MBB, int *BytesRemoved=nullptr) const override
bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) const override
const BPFRegisterInfo & getRegisterInfo() const
Definition: BPFInstrInfo.h:31
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
void loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override
#define I(x, y, z)
Definition: MD5.cpp:58
void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override