[PowerPC] Do not emit record-form rotates when record-form andi/andis suffices
[llvm-core.git] / lib / Target / BPF / BPFInstrInfo.h
blobfb65a86a6d1897b21ed4b265a241497ad101139e
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.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_BPF_BPFINSTRINFO_H
15 #define LLVM_LIB_TARGET_BPF_BPFINSTRINFO_H
17 #include "BPFRegisterInfo.h"
18 #include "llvm/CodeGen/TargetInstrInfo.h"
20 #define GET_INSTRINFO_HEADER
21 #include "BPFGenInstrInfo.inc"
23 namespace llvm {
25 class BPFInstrInfo : public BPFGenInstrInfo {
26 const BPFRegisterInfo RI;
28 public:
29 BPFInstrInfo();
31 const BPFRegisterInfo &getRegisterInfo() const { return RI; }
33 void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
34 const DebugLoc &DL, unsigned DestReg, unsigned SrcReg,
35 bool KillSrc) const override;
37 bool expandPostRAPseudo(MachineInstr &MI) const override;
39 void storeRegToStackSlot(MachineBasicBlock &MBB,
40 MachineBasicBlock::iterator MBBI, unsigned SrcReg,
41 bool isKill, int FrameIndex,
42 const TargetRegisterClass *RC,
43 const TargetRegisterInfo *TRI) const override;
45 void loadRegFromStackSlot(MachineBasicBlock &MBB,
46 MachineBasicBlock::iterator MBBI, unsigned DestReg,
47 int FrameIndex, const TargetRegisterClass *RC,
48 const TargetRegisterInfo *TRI) const override;
49 bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
50 MachineBasicBlock *&FBB,
51 SmallVectorImpl<MachineOperand> &Cond,
52 bool AllowModify) const override;
54 unsigned removeBranch(MachineBasicBlock &MBB,
55 int *BytesRemoved = nullptr) const override;
56 unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
57 MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond,
58 const DebugLoc &DL,
59 int *BytesAdded = nullptr) const override;
60 private:
61 void expandMEMCPY(MachineBasicBlock::iterator) const;
66 #endif